Search This Blog

Sunday, November 5, 2017

Test network connectivity with Powershell (Replace Telnet Client)

You don't need to install Telnet Client on Windows Client and Server OSes to check if TCP port on remote machine is available from it.

Simply use this Poweshell command (replace ComputerName and Port with your own values)

Test-NetConnection -ComputerName 8.8.8.8 -Port 53

The output will be something like this:

ComputerName           : 8.8.8.8
RemoteAddress          : 8.8.8.8
RemotePort             : 53
InterfaceAlias         : Ethernet
SourceAddress          : 192.168.1.3
PingSucceeded          : True
PingReplyDetails (RTT) : 73 ms
TcpTestSucceeded       : True


This works for Windows 8 / 2012 and later OSes.

As always use Get-Help to get more info about the cmdlet.

No comments:

Post a Comment