gwmi - HRESULT: 0x80070005 (E_ACCESSDENIED)

AV 20 Reputation points
2025-03-28T11:14:00.8433333+00:00

Hi!

I've been trying to get gwmi and Get-WmiObject to work. But it won't budge.

For some reason, using command "gwmi win32_service -Credential [domain]\login] -computer [ip]" gives me HRESULT: 0x80070005 (E_ACCESSDENIED).

I have tested the same command from non-domain PC, where I didn't configure WMI at all, works fine.

I've scouted politics, no PS or WMI restrictions.

Tested from same domain\user.

Here how it looks right now (blue - domain, green - WMI success, red - WMI fail):WMI

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,635 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 44,345 Reputation points MVP
    2025-03-28T11:25:30.1833333+00:00

    Follow https://learn.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/scenario-guide-troubleshoot-wmi-connectivity-access-issues


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. AV 20 Reputation points
    2025-03-31T10:36:04.8333333+00:00

    Didn't help.

    But TSS script revealed that update needed, although, how access and updates connected. : |

    Anyway, after updating it started to work!

    0 comments No comments

  2. Ian Xue-MSFT 41,691 Reputation points Microsoft External Staff
    2025-04-01T09:29:06.36+00:00

    Hi AV,

    Thanks for your post. Can I know if you are running the script "as administrator" (UAC)? When your credentials are calculated for your local instance if you have UAC enabled and you didn't run it "as administrator" it removes the local administrator security token. Connecting to a different machine over the network, A) it completely bypasses UAC, and B) when the target evaluates your token, the group memberships you're in are fully evaluated and thus you get "administrator" access.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.