Computer PS
Get-ADComputer -Filter * -Properties * | where {$_.operatingsystem -like "2012"}
Get-ADComputer -Filter 'operatingsystem -like "2012"'
Get-ADComputer -Filter * -Properties DNSHostName | foreach {Test-Connection -count 1 -ComputerName $_.dnshostname}
Get-ADComputer -Filter * -Properties DNSHostName | foreach {Test-NetConnection -ComputerName $.dnshostname -port 135} | where{$.PingSucceeded -eq "true"}
Last updated