I am trying to get a simple get-wmiobject win32_process from a machine in the domanin, but using a different credential
$credential = New-Object System.Management.Automation.PSCredential (“admsql”, (Get-Content C:\scripts\securestring.txt | convertto-securestring))
Get-WmiObject win32_process -ComputerName ‘10.2.0.56’ -Credential $credential
First, let’s try and simplify the problem a bit by eliminating the credential object. As a test, try doing the Get-WmiObject call, passing the “MACHINENAME\USERNAME” to -Credential. Let it prompt you for the password. Does that work?
When I use administrator it works fine. When I try to use the admsql, that is a account in the local administrator group, not works with access denied. We have Symantec endpoint in the server, but even with enabled it works with administrator account. Do you have some idea Don ?
This thread looks familiar. The problem and several potential solutions are described in this MSDN article, in the “Handling Remote Connections Under UAC” section.