Quickie one liner;

get-adcomputer -filter * | Where { Test-Connection $_.name -count 1 -quiet } | Select @{Name=”Computername”;Expression={$_.Name}}

Reference : https://www.petri.com/test-network-connectivity-powershell-test-connection-cmdlet

Leave Your Comment

Your email address will not be published. Required fields are marked *

ten + fifteen =