There are times when I need to “terminate” a process on one of my servers.
Usually the simple way is to do RDP to the server and “kill” the process in the task manager.
The problem begins when I need to perform this task again and again, which can be very annoying, so then I start to look for shortcuts.
One of the ways to accomplish this task is with a little cmd command called taskkill.exe.
With this little command I can “kill” a process from cmd or write a batch file and run it as a schedule task.
Another option this command has is the ability to do it all from a remote computer without the need to connect the server.
Here is an example:
TASKKILL /S %servername% /U %username% /P %password% /IM notepad.exe