[英]Start-Process with alternative credential in a remote session
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\\ .
我有一个像[myComputername]的提示:PS C:\\ Users \\ user \\ 。 Then I try to Start-Process with another user, say domain\\user2.
然后我尝试与另一个用户进行Start-Process,比如domain \\ user2。 However it failed, although the executable path fed to the Start-Process is full under control of domain\\user2.
但是它失败了,尽管在域\\ user2的控制下,提供给Start-Process的可执行路径已满。 I suppose there is no permission problem on this.
我想这没有许可问题。 For example
例如
Start-Process -FilePath powershell -ArgumentList "-command
" & {whoami} "" -Credential domain\\user2 -WorkingDirectory workingdirectory
Start-Process -FilePath powershell -ArgumentList "-command
”&{whoami} "" -Credential domain\\user2 -WorkingDirectory workingdirectory
It wouldn't print the domain\\user2. 它不会打印域\\ 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. 我相信你有可怕的Powershell Remoting Second Hop蓝调。
http://technet.microsoft.com/en-us/magazine/jj853299.aspx http://technet.microsoft.com/en-us/magazine/jj853299.aspx
CredSSP: CredSSP身份:
http://msdn.microsoft.com/en-us/library/ee309365(v=vs.85).aspx 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 http://www.vinithmenon.com/2012/11/delegated-administration-in-windows.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.