Found something, but only for one and it is also not accurate.. Any help is appreciated.
$servers=get-content "D:\instances.txt"
foreach($server in $servers)
{ get-wmiobject win32_service -computername $server |
select name,state |
where {
($_.name -like "SQLAGENT*" -or $_.name -like "SQL*AGENT" ) `
-and $_.state -match "Stopped"} | Out-String
}
Cheers,
- Win
"Dont Judge a Book by its Cover"