Since Windows 8.1 and Windows Server 2012 R2, Microsoft released Powershell 4. A new cmdlet can be use to troubleshoot network connections issues : Test-NetConnection.
With Windows version older than Windows 8.1, you must install the Telnet client to test if a specific port is open on a remote host. Now, we have a built-in tool!
Let’s see how to use this cmdlet:
Test-NetConnection
We can use 3 parameters for this command:
- Computername: your remote host.
- Port: the port number you that you want to test.
- InformationLevel: is optional, but you can get more information about the DNS resolution.
Checking an opened port with low details information:
Checking an closed port with low details information:
Checking an opened port with detailed information:
More
You can get more information about the cmdlet here.