Advertisement
easternnl

Check if computers are up and running in a certain OU

Jul 24th, 2015
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Get-ADComputer -filter * -searchbase "OU=Servers,OU=Testlab,DC=testlab,DC=local" | % { if (( Test-Connection $_.name -count 1 -quiet) -eq $false) { write-host $_.name } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement