wbemtest or a WMI script gets Access is denied from a remote PC
Fix it fast
Most common cause, 1 of 3A local administrator account in a workgroup is filtered by remote UAC
The approach Microsoft prefers is a dedicated local user for remote WMI, given DCOM remote launch, activation and access plus Remote Enable on the namespace (the steps in cause 2).
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /fShort answer
WMI error 0x80070005 (Access is denied, -2147024891) is a DCOM refusal. Usually the account is a local, non-domain admin whose rights UAC strips on remote logons, or a non-admin with no DCOM remote launch, activation and access rights. On Windows 11 and Server 2025, connect as a domain admin of the target, or grant those DCOM rights plus Remote Enable.
Which cause do you have?
On the target computer, find out whether it belongs to a domain and whether remote UAC filtering has been changed. A workgroup machine with no LocalAccountTokenFilterPolicy value points to cause 1; a domain machine points to cause 2.
Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Name, PartOfDomain, Workgroup
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicyThen find the line you see in this list and open its fix:
- 1A local administrator account in a workgroup is filtered by remote UAC
PartOfDomain is False, you connect as TARGET\someadmin, and the same account works when you sign in at the target itself - 2The account is not an administrator on the target and has no DCOM remote rights
You use a domain or local account that is outside the target's Administrators group; adding it to that group makes the error stop - 3The tool runs without elevation on the machine itself
The access denied appears even on the target computer, and goes away when the same command runs from an elevated window
What does the error look like?
0x80070005 Access is deniedDCOM Access Denied (decimal -2147024891, hex 0x80070005)
Cause 1 of 3
A local administrator account in a workgroup is filtered by remote UAC
You seePartOfDomain is False, you connect as TARGET\someadmin, and the same account works when you sign in at the target itself
Check
Microsoft's UAC and WMI page explains the 0x80070005 Access is denied result for workgroups: a local account in the Administrators group still connects as a standard user from another machine, because UAC hands remote logons a filtered token. Being an admin on paper is not enough.
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicyFix
The approach Microsoft prefers is a dedicated local user for remote WMI, given DCOM remote launch, activation and access plus Remote Enable on the namespace (the steps in cause 2). Turning remote UAC off is described as not recommended, though sometimes needed in a workgroup: a value of 1 disables the filtering, 0 keeps it on. Run it on the target only if you accept that risk.
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /fVerify
From the other computer, connect wbemtest to the target's root\cimv2 namespace again. It opens, and a query on a class such as Win32_Process returns rows.
SELECT * FROM Win32_ProcessConfirmed by learn.microsoft.com
Cause 2 of 3
The account is not an administrator on the target and has no DCOM remote rights
You seeYou use a domain or local account that is outside the target's Administrators group; adding it to that group makes the error stop
Check
Only members of Administrators may connect to WMI remotely by default. Microsoft's guide on securing a remote WMI connection names DCOM Access Denied, hex 0x80070005, as the error any other account receives until DCOM rights are granted on the target.
dcomcnfgFix
On the target, open DCOMCNFG, then Component Services, Computers, right-click My Computer, Properties, COM Security. Under Launch and Activation Permissions choose Edit Limits and allow Remote Launch and Remote Activation for the account. Under Access Permissions choose Edit Limits and allow Remote Access. Next run wmimgmt.msc, open Properties, Security tab, select the namespace (for example root\cimv2), click Security and tick Remote Enable for the same account.
wmimgmt.mscVerify
wbemtest connects from the other machine. If the error now reads 0x80041003 instead, DCOM is fixed and only the namespace Remote Enable right is still missing.
wbemtestConfirmed by learn.microsoft.com
Cause 3 of 3
The tool runs without elevation on the machine itself
You seeThe access denied appears even on the target computer, and goes away when the same command runs from an elevated window
Check
Locally, an administrator under UAC holds two tokens and normal windows use the standard-user one. Microsoft notes that WMI scripts then fail with access denied when the operation needs admin rights, and the script has no way to tell which token it got.
Get-CimInstance -ClassName Win32_ComputerSystemFix
Right-click Command Prompt or PowerShell and pick Run as administrator, then repeat the call. For a job that runs on a timer, let Task Scheduler start it elevated.
Start-Process -FilePath "powershell" -Verb RunAsVerify
The query that failed returns data in the elevated window.
Get-CimInstance -ClassName Win32_ProcessConfirmed by learn.microsoft.com
How do I stop it coming back?
- In a domain, connect with a domain account that sits in the target's Administrators group instead of a local account on that computer.
- Create one local monitoring account per workgroup server with exactly the DCOM rights and namespace Remote Enable it needs, and note those grants in your server build script.
- Record any LocalAccountTokenFilterPolicy change in your hardening checklist so it can be reviewed and reverted later.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.