gwmi win32_service -ComputerName IP –credential userName returns Access denied but Enter-PSSession -ComputerName IP -Credential Personal works


Running this powershell command

Enter-PSSession -ComputerName -Credential Personal

command works fine. The username and password is accepted. Again, running this command:

Invoke-Command -ComputerName -ScriptBlock { Get-ChildItem C:\ } -credential Personal

Also works fine and it displays the folders in drive C. It also implies that i can login. When i run this command:

gwmi win32_service –credential Personal –computer

I get "gwmi : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

So does this:

Copy-Item -Path c:\d\test.txt -Destination \\\c$\dep\test.txt

I've tried everything i could think of and i still fail. My goal is to copy files to target computers and execute these files. I have about 52 machines and i need to be able to install these programs. Anyone knows why this isn't working?


0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0