Skip to content

Instantly share code, notes, and snippets.

@RafalSladek
Created May 1, 2017 11:32
Show Gist options
  • Select an option

  • Save RafalSladek/a9ae21f6ae73effa20f79637aabf2d9d to your computer and use it in GitHub Desktop.

Select an option

Save RafalSladek/a9ae21f6ae73effa20f79637aabf2d9d to your computer and use it in GitHub Desktop.
list all services and write them into a services.txt, read file line by line and stop listed services
rem net start > services.txt
for /F "tokens=*" %%A in (services.txt) do (
ECHO Stopping service %%A....
net stop "%%A"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment