Monitor Services (Active!)

Here’s a one-liner solution script to actively monitor services. The script gets all services with a startup mode ‘Automatic’ and if some are stopped, starts them.
Has to be scheduled, every 5 minutes for example. (“-Repeat” option)
http://www.zerrouki.com/schedule-a-powershell-script-execution/

$Services=Get-WmiObject -Class Win32_Service | Where {($_.StartMode -eq "Auto") -and ($_.State -eq "Stopped")} | Start-Service -ErrorAction SilentlyContinue

Leave a Reply

Scroll to Top