当我跑步时
Invoke-Command -ComputerName NY-TRAINING -ScriptBlock { Start-Process '\\Ny-wnorales\c$\CitrixReceiver 4.10.exe' }
我收到“拒绝访问”错误消息 我甚至尝试过
答案 0 :(得分:1)
这是一个解决方法(看起来像@EBGreen指出的双跃点问题):
$Credential = Get-Credential
Invoke-Command -ComputerName NY-TRAINING -Credential $Credential -ScriptBlock {
$Drive = @{
Name = 'Remote'
PSProvider = 'FileSystem'
Root = '\\Ny-wnorales\C$'
Credential = $using:Credential
}
New-PSDrive @Drive
Start-Process -FilePath 'Remote:\CitrixReceiver 4.10.exe' -Credential $using:Credential
}