Change Service Startmode

by Dec 1, 2011

You can use WMI like this if you want to change a service start mode:

([wmi]'Win32_Service.Name="Spooler"').ChangeStartMode('Automatic').ReturnValue
([wmi]'Win32_Service.Name="Spooler"').ChangeStartMode('Manual').ReturnValue 

Note that a return value of 0 indicates success. You will need Administrator privileges to change the start mode.

Twitter This Tip!
ReTweet this Tip!