Powershell 从计算机A远程安装到服务器B,并从服务器C远程安装安装程序UNC路径
嗨,当我运行这个powershell代码时,我的powershell就挂起了Powershell 从计算机A远程安装到服务器B,并从服务器C远程安装安装程序UNC路径,powershell,remote-desktop,remote-server,Powershell,Remote Desktop,Remote Server,嗨,当我运行这个powershell代码时,我的powershell就挂起了 Set-Content "\\$remote_computer\users\bkoo004\downloads\test\installme.bat" -value 'START "installing" "S:\npp.6.3.3.Installer.exe" /S' Invoke-Command -ComputerName $remote_computer -Credential $cred -ScriptBloc
Set-Content "\\$remote_computer\users\bkoo004\downloads\test\installme.bat" -value 'START "installing" "S:\npp.6.3.3.Installer.exe" /S'
Invoke-Command -ComputerName $remote_computer -Credential $cred -ScriptBlock {Start-Process 'c:\users\bkoo004\downloads\test\installme.bat' -Wait}
但是如果你运行这个代码
Set-Content "\\$remote_computer\users\bkoo004\downloads\test\installme.bat" -value 'START "installing" "C:\users\user\downloads\npp.6.3.3.Installer.exe" /S'
Invoke-Command -ComputerName $remote_computer -Credential $cred -ScriptBlock {Start-Process 'c:\users\bkoo004\downloads\test\installme.bat' -Wait}
我可以很好地安装。。我认为是某个UAC或其他安全性试图阻止我从UNC路径(驱动器S)进行安装。有人能帮忙吗?是因为双跳吗?是服务器上的
S:
网络驱动器吗?我在服务器B中映射了S:驱动器,即使没有映射我的,我也无法从UNC路径安装这就是所谓的