Get startup type of Windows service using PowerShell

kubusz picture kubusz · Nov 29, 2010 · Viewed 132.5k times · Source

How can I get the Windows service startup type using PowerShell and not using WMI?

I looked inside the Get-Service command, and it does not provide something to display the "startup type".

Answer

ravikanth picture ravikanth · Nov 29, 2010

WMI is the way to do this.

Get-WmiObject -Query "Select StartMode From Win32_Service Where Name='winmgmt'"

Or

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