Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

Home > Success Center > Orion Platform > Orion - Knowledgebase Articles > Use PowerShell to test that a port is open on a server

Use PowerShell to test that a port is open on a server

Table of contents

Updated: 03/12/2018


How to test that a specific ports is open without using telnet.


  • All modules
  • All Windows Server versions


1. Use the script bellow to check if the port is open.

2. Replace IP_Address_Server with the address of the server you are interested in.

3. Replace port with the port to check (e.g. 17777).

4. Save this script in a text file as porttest.ps1 and run in PowerShell.

$ipaddress = IP_Address_Server
$port = port
$connection = New-Object System.Net.Sockets.TcpClient($ipaddress, $port)
if ($connection.Connected) {
    Write-Host "Success"
else {
    Write-Host "Failed"


Last modified