我想在卸载Pulse Secure并使用Powershell安装更新版本之前停止Pulse Secure
在计算机的CMD中,您可以键入以下命令来停止它:
"C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\Pulse.exe" -stop但我似乎不能让它停止从Powershell。我尝试了几个不同的变体,但似乎不能得到它。
$PC = (Read-Host "Enter Computer Name").ToUpper()
ICM $PC {& cmd.exe /c '"C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\Pulse.exe" -stop'}。
$PC = (Read-Host "Enter Computer Name").ToUpper()
$STOP = "C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\Pulse.exe"
ICM $PC {& cmd.exe /c "$STOP -stop"}第二个选项返回'-stop‘不被识别为内部或外部命令...有什么建议或更好的方法来阻止它吗?
发布于 2021-05-13 02:06:13
invoke-command -ComputerName $pc -ScriptBlock {Stop-process -name Pulse -force}这就是它。
https://stackoverflow.com/questions/67508696
复制相似问题