Wednesday, July 16, 2014

Kill Remote Process using PowerShell

Here are the steps to kill a process running on remote machine

1. Start PowerShell
2. $processes = Get-WmiObject -class win32_process -ComputerName <name_of_computer> -Filter "Name='notepad.exe'"
3. $x = $processes.terminate()
4. echo $x

Return value should be 0

No comments:

Post a Comment