Where I am working now, they believe in the least access rule.
The problem is, they are not sure what access my account needs to do inventories on several remote machines.
And no, they won't make me a member of the administrators group.
So what are the minimum permissions I need to run WMI queries and to read the registry on a remote server?
Right now my scripts get "access denied" when I run the script from my desktop.
I can log on to the machines via Remote Desktop and run the scrip localy.
$SPAdmin = $user $Password = $Pwd | ConvertTo-SecureString -AsPlainText -Force $Cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $SPAdmin, $Password if (test-connection $computer) { $OS = gwmi -Class Win32_OperatingSystem -ComputerName $computer -credential $cred }