I am trying to connect to a server remotely using wbemtest (WMI). I keep on getting error; Number: 0x80070005 Facility: Win32 Description: Access is Denied.
I have done the following to try to clear this error;
- Added account to Local Administrators group
- Ensured user is allowed to Access this computer from the network under local group policy. > Computer configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment.
- Added user account for Local and remote access in DCOM settings - DCOMcnfg.exe also under WMI DCOM config
- Assigned user full rights under root namespace in wmimgmt.msc
- Ensured requried ports are open - 135, 445, 49152-65535, 1025-1030.
- Ensured all required services are running.
If the server is a recently update Windows which the client is not updated this problem might be cause by DCOM Hardening patch https://support.microsoft.com/en-us/topic/kb5004442-manage-changes-for-windows-dcom-server-security-feature-bypass-cve-2021-26414-f1400b52-c141-43d2-941e-37ed901c769c.
In this case the solution is to install the latest security patches (14 March 2023) in both client and the server.