How to kill a process running under SYSTEM account in the Windows Server?

Ivan Pizhenko 1 Reputation point
2021-08-10T05:41:30.04+00:00

I have a server with Windows Server 2008 R2 and a service process (our custom service) running on it under SYSTEM account. A service has presumably hanged and I wanted to stop it. I tried stopping via Management Console "Services" snap-in, but it didn't help, service process still running, despite in the Management Console it is already marked as not running. Is there a way to kill it from the command line? Note that service runs under the SYSTEM account. I have full administrative privileges on the server.

I have tried pskill from console with elevated privileges (just as pskill PID), but it didn't do the job: it has reported that process killed, but I still see it in the Task Manager.

Taskkill also doesn't help:

C:\>taskkill /f /im myservice.exe
ERROR: The process "myservice.exe" with PID 1268 could not be terminated.
Reason: There is no running instance of the task.

But the process still visible in the Task Manager.

Update:
Powerhell Stop-Process -Name myservice -Force also didn't work.

Any ideas how to really kill the process (except rebooting the server)?

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Charles Thivierge 4,181 Reputation points
    2021-08-10T13:20:22.793+00:00

    In some cases, i was able to kill weird process like that using Process Explorer from the Sysinternals suite
    https://learn.microsoft.com/en-us/sysinternals/downloads/

    But if this is still not working, the only way is to reboot

    1 person found this answer helpful.

  2. Anonymous
    2021-08-10T12:06:15.673+00:00

    A service has presumably hanged

    As far as I know a reboot may be needed here.

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.