Skip to content

Instantly share code, notes, and snippets.

@willm
Last active August 29, 2015 14:01
Show Gist options
  • Save willm/bcd2d19e6a29d3a53369 to your computer and use it in GitHub Desktop.
Save willm/bcd2d19e6a29d3a53369 to your computer and use it in GitHub Desktop.
killing a windows service stuck in stopping state
sc queryex {SERVICE_NAME}
::get the name from the properties in the ui
taskkill /PID {PID} /F
::get the pid from the output of the previous command
::Or more concisely
taskkill /F /FI "SERVICES eq {service-name}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment