There are several approaches you can take to remote kill processes from a CLI:
Powershell
Assuming you have an account with the requisite permissions, and have configured Powershell for remote use (not covered in this answer, but here's a free e-book from Don Jones covering how to get set up,) you can use one of several Cmdlets to remotely kill processes.
Stop-Process via Invoke-Command
You should be able to use Stop-Process
along with an Invoke-Command
(or by opening a more permanent remote session).
Invoke-Command -ComputerName RemoteComputer -ScriptBlock
This would be my preference, but requires some configuration in advance, so is not ideal in every situation.
Built-in Solutions
Taskkill.exe
Taskkill is provided on recent Windows machines, and can be used remotely with the /s
parameter.
Example:
taskkill /s remotecomputer /pid processID
Sysinternals Tools
You can also use either of PSKill or PSExec (available at live.sysinternals.com) to terminate processes.
PSKill
Similar to Taskkill, but not provided on Windows machines by default.
Example:
pskill \\remotecomputer <process ID | name>
PSExec
Using PSExec, on the other hand, you can run any command you would normally use to manage processes locally.
Example:
psexec \\remotecomputer taskkill /pid processID