Wednesday, February 11, 2009

Kill Process On Remote Machine

It is not recommended that each and every time abort process this way but sometime it is necessary stop some process from executing on remote machine.

There are few useful command for that.

TaskList
Taskkill or tskill

Run following command on command prompt.
> TaskList     ( Current system running process list)

> TaskList /S <system name>
    e.g Remote system name remote1 then
   TaskList /S remote1
   Some of the case you require to pass credential for remote pc in that case use following command.
   TaskList /S remote1 /U <username> /P <Password>
TaskList command is used to get process id that we want to kill.

To Kill process there are two command TaskKill and tskill . I prefer TaskKill over tskill as it gives more command line options.

> TaskKill /PID <process id> ( use to kill perticular process that identified by process id on local machine)

> Taskkill /S <remote pc name or IP Address> /PID <process id> ( kill process that identified by process id on remote machine)

If remote pc require credential than use

> taskkill /S < remote pc name or IP Address> /PID <process id> /U <username> /P <password>

All above command are tested on Windows XP and Windows 2003.
You must require permission to run above command in order to use functionality.

In All Above you can use IP Address instead of remote PC name.

No comments: