Test-NetConnection
From DikapediaV2
For Windows
PS C:\windows\system32> test-NetConnection 172.18.12.43 -port 22 ComputerName : 172.18.12.43 RemoteAddress : 172.18.12.43 RemotePort : 22 InterfaceAlias : Ethernet 3 SourceAddress : 172.24.113.86 TcpTestSucceeded : True