Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get-ADComputer -filter * -searchbase "OU=Servers,dc=testlabl,dc=local" |where { $_.name -notlike "*AV*"} | foreach {
- $result = gwmi -ComputerName "$($_.name)" win32_product | where { $_.name -ilike "*monitoring agent*"} | select name,version
- if ($result)
- { write-host -ForegroundColor White "$($_.name) Yes" }
- else
- { write-host -ForegroundColor Red "$($_.name) No" }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement