How To Stop A Windows Service Stuck In Stopping
Every infracture admin need to know the steps to force end or kill windows service stuck at stopping past pid using taskkill or powershell. Call up about a situation, you are trying to stop a windows service but its stuck at stopping status. Means service stopping hung and not responding. In this example we need to force kill windows service either by using taskkill in command line (cmd) or by powershell. Follow the step by step commands to apply in cmd for force end service windows server.
Run command prompt as an administrator and type taskkill help command as below. That will display parameter list like /S, /U, /P, /FI, /PID, /IM, /T, /F, /? and why these are used. Yous volition notice these parameters in the commands below.
kill windows service command line
taskkill /?
First stride is to identify the "Service name" of windows service stuck at stopping. Let's say windows update service stuck at stopping, so right click on the service and click on properties will testify y'all the service proper noun "wuauserv". Alterenatively, you can run powershell control "Go-Service" to get windows service details. Run the below control in command prompt to get the PID of service.
sc queryex <service name> sc queryex wuauserv
You tin can cheque the PID in "Task director" nether the the tab "Services".
Next step is to kill windows service PID running below cmd in command prompt.
taskkill /f /pid [PID] taskkill /f /pid 996
Yous will observe the service is stopped later applying the command above. You can disable the serivce else utilize the state equally per your requirement.
You can kill processes from command prompt without knowing the PID by running the below control.
taskkill /F /FI "SERVICES eq wuauserv"
You tin can force stop a service running with particular user id using below cmd.
taskkill /F /FI "USERNAME eq Deviprasad"
cmd to chore kill all windows services non respnding running as below.
taskkill /F /FI "status eq not responding"
You can kill services consuming more then a limit of retentivity usage following the command below.
taskkill /FI "memusage gt value" taskkill /FI "memusage gt 220600"
Run the cmd as below to become list of tasks running in server.
tasklist
nosotros can run the below cmd to kill task running in the server.
taskkill /F /IM taskmgr.exe
Terminate task using powershell
We tin can employ below powershell commands to impale windows service.
Stop-Process -ID ProcessID - Force Cease-Process -ID 6196 - Force
Cease-Process -Name ProcessName -Forcefulness Stop-Process -Proper noun iexplorer -Force
powershell command to strength kill services not responding.
Become-WmiObject -Grade win32_service | Where-Object {$_.state -eq 'stop pending'}
Watch the video to get details step past step for better understanding.
Categories: administration, SharePoint 2019, sharepoint services, Task, windows service, Work Procedure
Source: https://sharepointtechnicalsupport.com/kill-windows-service-stuck-at-stopping/
Posted by: royacquaid.blogspot.com
0 Response to "How To Stop A Windows Service Stuck In Stopping"
Post a Comment