I want to run a query (for example CIM_Memory) on a remote computer, in that case it's a virtual machine. I use this code in Powershell:
Get-WmiObject CIM_Memory -ComputerName IPADDRESS -Credential USERNAME
Of course with an actual IP and Username. RemoteAdmin is enabled on both OS (both Win7).
I'm getting this exception:
Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)
Since it's Win7 with the UAC feature, the users get an access token. So there's this registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ LocalAccountTokenFilterPolicy
After setting this to 1, still getting the same exception. What could be the problem?