The Test-NetConnection function checks if an IP responds to ICMP and whether a specified TCP port on the target host is open. Test-NetConnection -Port 445 192.168.50.151