If you have used Get-Service in PowerShell V4, V3, V2 to find the status of a service or to restart a service you may have noticed that the get-service cmdlet does not show you the start type type (Auto, Manual, Disabled). If you run just Get-Service you will get the following
As you can see the only information display is Status, Name and DisplayName. You can get more information if you run the following cmdlet Get-Service | format-list * you will get all the information that the cmdlet gives you
If you run Get-Service -name VSS | get-member you will see that start type method is not part of the cmdlet
So in order to find the start type on PowerShell V4 or before you can use Get-Ciminstance cmdlet. If you run the following cmdlet it will show start type
Get-CimInstance Win32_Service
Lets say you want to get all the services that start type is Manual. You can use the where-object along with Get-CimInstance
Get-CimInstance Win32_Service | Where-Object {$_.StartMode -eq ‘Manual’}
Now if you want to start all this service you can pipe the name to start-service
Get-CimInstance Win32_Service | Where-Object {$_.StartMode -eq ‘Manual’} | Select-Object Name | Start-Service
Now let me give you a reason why you want to use PowerShell 5 If you run Get-service | format-list *, you will get the start type o this cmdlet now
As you see StartType is part of the cmdlet now. If you want to get all the startType = manual you will run the following
Get-Service | Where-Object { $_.StartType -eq ‘Manual’}
If you dont trust the information on the screen you can add to the display the startType as a column
Get-Service | Where-Object { $_.StartType -eq ‘Manual’} | Select-Object status, name, StartType