Skip to main content

Sometimes when trying to restart a service in Windows, the service happens to have a status of Stopping. As a result, it ends up getting stuck and without the possibility of giving the stop and start command. Here in this case, we can see the Veeam Backup Enterprise Manager service crashed:

 

So we need to terminate the process of this service through the command prompt. For that, you need to use the following command:

sc queryex <service>

Now we can obtain the PID (process identifier) of the process related to the crashed service:

 

With the PID number in hands, just run the command below:

taskkill /pid <PID> /f

This way the process is closed and you can start it again normally:

 

Very cool @wolff.mateus learn something new today.  Will keep this reference for future use. Thanks for sharing 👍


Yep @wolff.mateus to check list of services you also can use

tasklist | findstr Services 

or 

tasklist | findstr Nameofservice 

this command list all (or specific) services with PID number and mem usage and you can kill it. 

The biggest problem is its troubleshooting that need to spent a lot of time. 😖


Yep @wolff.mateus to check list of services you also can use

tasklist | findstr Services 

or 

tasklist | findstr Nameofservice 

this command list all (or specific) services with PID number and mem usage and you can kill it. 

The biggest problem is its troubleshooting that need to spent a lot of time. 😖

Nice to know @Andanet! Thanks for that.


For the PowerShell folks:

$id = (get-wmiobject win32_service | where { $_.name -eq ‘ServiceName’}).processID

Stop-Process $id -Force

 


For the PowerShell folks:

$id = (get-wmiobject win32_service | where { $_.name -eq ‘ServiceName’}).processID

Stop-Process $id -Force

 

Ah yes good old PowerShell.  Love this for sure. 😀


I tend to use “taskkill /IM executablename.exe /F” to kill off the processes, but that requires you know the image name.


These are handy commands! A a lot of users will find this content useful..


For the PowerShell folks:

$id = (get-wmiobject win32_service | where { $_.name -eq ‘ServiceName’}).processID

Stop-Process $id -Force

 

Awesome! Sometimes, the Get-WMIObject cmdlets still works and other times they don’t. By the way, this cmdlets have been superseded with the CimInstance cmdlet.


Comment