# 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"}
