misctechmusings notebook for projects, problems and solutions

Windows 2008 access denied killing a process

There are multiple times where I have been unable to kill a process on Windows 2008 server. Generally the process is running as a domain account. Killing the process failed using an administrative prompt and/or the account the process was started with.

The process is owned by the System account. You can use the Sysinternals tool psexec with the -s switch to run as the System account. The -i switch allows the process to interact with the desktop.

psexec -i -s pskill someprocess.exe`

You can use psexec to call a CMD prompt, taskkill, etc.