Sometimes when a windows service does not behave as expected, a restart of the service is required. This is easily done in the ‘Service’ window, by right clicking on a particular service and then left clicking on ‘Restart’. After doing this, usually the service will restart, but if the service is stuck at ‘Stopping’, a ‘taskkill’ command can be used to force stop the service.
In the example below, a Matrikon Tunneller CSC service is stuck at ‘Stopping’.
![](https://zainuri.net/wp-content/uploads/2021/10/01-Service-stopping-marked.png)
To ensure the taskkill command run successfully the command window will need to run as an administrator user. Right click on the Command Prompt icon and click on ‘Run as administrator’.
![](https://zainuri.net/wp-content/uploads/2021/10/02-Run-command-as-admin-user.png)
The taskkill command format is:
taskkill /pid <PID> /f
Where the <PID> is the process ID which is displayed in the ‘PID’ column in the task manager. The ‘/f’ parameter specifies to forcefully terminate the task/process. Enter the command as per the example below and then press enter.
![](https://zainuri.net/wp-content/uploads/2021/10/03-taskkill.png)
A “SUCCESS” message will be displayed.
![](https://zainuri.net/wp-content/uploads/2021/10/04-taskkill-completed.png)
Verify in task manager of services window that the service has stopped.
![](https://zainuri.net/wp-content/uploads/2021/10/05-task-manager-service-stopped-marked-1.png)