Created
January 8, 2017 17:52
-
-
Save kagarlickij/ef1c20975752a1c0c4d41af43ccc0846 to your computer and use it in GitHub Desktop.
Check if Windows services with startup type Automatic are running
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using PowerShell | |
Get-Service | Where-Object {$_.StartType -eq 'Auto' -and $_.Status -ne 'Running'} | |
# Using WMI | |
Get-WmiObject Win32_Service | Where-Object {$_.StartMode -eq 'Auto' -and $_.Status -ne 'OK'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment