Sometimes we need to take a look at what services that are set to be “automatic” in Windows, happen to not be running. These services could inadvertently trigger alerts despite them being gracefully shutdown by a process, or they could indicate a potential reason for an issue.

Here’s a way to accomplish it:

Get-WmiObject -Class Win32_Service -Filter {State != 'Running' and StartMode = 'Auto'} |
ForEach-Object {Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\$($_.Name)" |
Where-Object {$_.Start -eq 2 -and $_.DelayedAutoStart -ne 1}} |
Select-Object -Property @{label='Inactive Services';expression={$_.PSChildName}}

This article has 1 comments

  1. Mohammed Ahmed Reply

    Thank You so much for this amazing script. It works perfectly. May God bless you.

Leave a Comment

Your email address will not be published. Required fields are marked *