Friday, August 06, 2010

Killing a hung service

Today I came across a system that was failing to heartbeat .  Opening services.msc on the box revealed that the System Center Management service status was “Starting”.   Stopping the service from services.msc didn’t work, so I had to resort to a more forceful option.

Here’s how I did it.

  1. Open a command prompt
  2. Query for the state and PID by entering “sc queryex healthservice”
  3. Now that we have the PID, we can use the Taskkill command by running “Taskkill /PID /1168 /F.  The /F switch will forcefully terminate our process.  

Now you can start the HealthService.

No comments: