'How can I stop a program on another computer using CMD with Powershell
I want to stop Pulse Secure before uninstalling it and installing a newer version using Powershell
In CMD from a computer you can type this to stop it:
"C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\Pulse.exe" -stop
But I can't seem to get it stopped from Powershell. I've tried a few different variants, but can't seem to get it.
$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"}
The second option returns '-stop' is not recognized as an internal or external command... Any suggestions or better ways to stop it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
