Windows Service "Startup" type not a property of get-service

Hi,
I am just wondering if I am doing something wrong or this is true that Get-service cmdlet does not have “Startup type” as the Property (member type) -
see
Get-service -name “service name” | gm

CanPauseAndContinue Property
CanShutdown Property
CanStop Property
Container Property
DependentServices Property
DisplayName Property
MachineName Property
ServiceHandle Property
ServiceName Property
ServicesDependedOn Property
ServiceType Property
Site Property
Status Property

so how can I find out the startup type of a Windows service using PowerShell get-service?
is there another cmdlet or name that does the job?

Hi,

Get-Service does not have an option to find the startup type.
But you can use this :

Get-WmiObject -Class Win32_Service -Property StartMode -Filter "Name='ServiceName'"

Have a good day !

Sorry, my previous post didn’t go well. And I don’t have the Edit button so…

This is the command : Get-WmiObject -Class Win32_Service -Property StartMode -Filter “Name=‘ServiceName’”

Thank you

This should give startup mode of all services;

Get-CimInstance -ClassName Win32_Service | Where-Object startmode -EQ ‘Auto’ | FT Displayname, name, startmode, started -AutoSize

For troubleshooting, often we need to determine services whose startup-mode is ‘Automatic’ but are not running. The following command will do this;

Get-CimInstance -ClassName Win32_Service | Where-Object startmode -EQ ‘Auto’ | FT Displayname, name, startmode, started -AutoSize | Findstr /c:“started” /c:“False”