all, I believe this scenario sounds indeed odd, but I do need your help on this. First I use
Enter-PSSession -ComputerName myComputerName -Credential domain\\user1
to remote to a third machine from my dev machine. I got a prompt like [myComputername]: PS C:\\Users\\user\\ . Then I try to Start-Process with another user, say domain\\user2. However it failed, although the executable path fed to the Start-Process is full under control of domain\\user2. I suppose there is no permission problem on this. For example
Start-Process -FilePath powershell -ArgumentList "-command
" & {whoami} "" -Credential domain\\user2 -WorkingDirectory workingdirectory
It wouldn't print the domain\\user2. And it would if you run this command after remote desktop to the test machine. Anyone knows the root cause and the fix of this? Thanks & Regards, Jingfei
I believe you have the dreaded Powershell Remoting Second Hop blues.
http://technet.microsoft.com/en-us/magazine/jj853299.aspx
CredSSP:
http://msdn.microsoft.com/en-us/library/ee309365(v=vs.85).aspx
Delegating credentials to a runspace:
http://www.vinithmenon.com/2012/11/delegated-administration-in-windows.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.