1. PowerShell Test-NetConnection
Since Windows 8.1/Server 2012 R2 you can now test/ping TCP connections over any port using PowerShell and the Test-NetConnection cmdlet.
The syntax for the command is as below. This tests if RDP (port 3389) is available/open on a server called ‘DC01‘ – you can change the hostname to an IP adress and you can use any port you like with the ‘-Port‘ switch:
Test-NetConnection DC01 -Port 3389
This should present results like the following with the key result being “TcpTestSuceeded: True” to signify that the port is indeed open:
If you run “Test-NetConnection” without specifying any parameters it will perform a test to determine if the device you are running the command on has access to the internet – this can be quite useful in a number of situations. When run on a client that does have Internet access you will see results similar to this:
paping.exe is an invaluable tool for testing network connectivity, especially in a firewalled environment where using telnet isn’t straightforward and standard ICMP ping is blocked.
The tool basically allows you to send a “ping” over any TCP port which means that even if a firewall blocks ICMP pings, the paping.exe packet will be allowed through on a port that is open through the firewall.
A good example of this might be testing connectivity to an SCCM Distribution Point where SMB (TCP port 445) has been allowed through a firewall but standard ping is blocked: simply copy the paping.exe onto the machine you wish to initiate the connectivity test from and run the following command from a command prompt:
paping.exe [target hostname or IP address] -p 445
This will send a constant ping on TCP port 445 to the hostname or IP address specified. Brilliant.
Find the download for the tool at: http://code.google.com/p/paping/
Alternative tool that does the same thing is PsPing from the Sysinternals Suite: