Disable a windows service from the command line

A quick command that I have used in a script to change the status of a service in Windows.

C:\> sc config “Spooler” start= disabled
[SC] ChangeServiceConfig SUCCESS

The start options are
start= <boot|system|auto|demand|disabled|delayed-auto>

auto–a service automatically started at boot time, even if no user logs on
boot–a device driver loaded by the boot loader
demand–a service that must be manually started (the default)
disabled–a service that can’t be started
system–a service started during kernel initialization

Changing more then one service at a time

DisablesĀ all services that start with the name VMware

C:\> wmic service where “caption like ‘VMware%’ and Startmode<>’Disabled'” call ChangeStartmode Disabled

 

This entry was posted in Microsoft and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *