Here is the VB Script to set the service startup type to Automatic
strSvcName = "APPMGMT" ' Service Name
strStartupType = "Automatic" ' can be "Automatic", "Manual", or "Disabled"
strComputer = "TFBLRTILT00111" ' Node Name
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set objService = objWMI.Get("Win32_Service.Name='" & strSvcName & "'")
intRC = objService.Change(,,,,strStartupType)
' can alternatively use objService.ChangeStartup(strStartupType) method
if intRC > 0 then
WScript.Echo "Error setting service startup type: " & intRC
else
WScript.Echo "Successfully set service startup type"
end if