Powershell

Powershell – Testing a Port with Test-NetConnection

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!

Test-NetConnection with google

Test-NetConnection with google

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:

Opened port

Opened port

 

Checking an closed port with low details information:

Closed Port

Closed Port

Checking an opened port with detailed information:

Opened Port with Details

Opened Port with Details

More

You can get more information about the cmdlet here.

Leave a Reply

Your email address will not be published. Required fields are marked *