root\MsCluster – The WMI provider returned an ‘access denied’ error

I have prepared the non-administrator user for collecting data using WMI.

I can query any namespace using this user except root/MSCluster. For root/MSCluster it returns ‘access denied’. At the same time, I can successfully query it using domain administrator account.

Get-WSManInstance wmi/root/mscluster/* -Enumerate -Filter "SELECT * FROM MSCluster_Resource" -ComputerName host1.corp.com -Authentication Kerberos -Credential john.doe@corp.com

‘john.doe@corp.com’ is added to ‘Performance Monitor Users’, ‘Distributed COM Users’ and ‘WinRMRemoteWMIUsers__’ groups, ‘Event Log Read Permission’ is granted, full access is granted for all WMI namespaces, full DCOM access is granted

Answer

You asked for the entire class to be instantiated. Looking at the class enumerator on msdn I’m not surprised it failed needing administrator access.

You could try querying the specific properties you need and see if you trigger an exception, but most will require admin access.

Here’s the msdn page for the class you’re using:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa371464(v=vs.85).aspx

Attribution
Source : Link , Question Author : John , Answer Author : Colyn1337

Leave a Comment