0

嗨,当我运行这个 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 -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)安装。有人可以帮忙吗?是因为双跳吗?

4

0 回答 0