Skip to content

Instantly share code, notes, and snippets.

@Ambratolm
Last active April 16, 2022 18:09
Show Gist options
  • Save Ambratolm/b3b7bf8571e08932446500ecbae666a2 to your computer and use it in GitHub Desktop.
Save Ambratolm/b3b7bf8571e08932446500ecbae666a2 to your computer and use it in GitHub Desktop.
Check if a Windows service exists, Enable it, and Start it.
REM Check if service exists
sc query serviceName
REM Enable service to run automatically
sc config serviceName start= auto
REM Start service
net start serviceName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment