I’ve seen lots of scripts out there for manually stopping/starting services in a list, but how can I generate that list programatically of -just- the automatic services. I want to script some reboots, and am looking for a way to verify that everything did in fact start up correctly for any services that were supposed to.
I’ve seen lots of scripts out there for manually stopping/starting services in a list,
Share
Get-ServicereturnsSystem.ServiceProcess.ServiceControllerobjects that do not expose this information. Thus, you should use WMI for this kind of task:Get-WmiObject Win32_Service. Example that shows the requiredStartModeand formats the output a la Windows control panel:You are interested in services that are automatic but not running: