PowerShell: Port Check

Overview

I ran into an issue the other day where I could not remote control a users machine, via SCCM, if they were connected to the VPN. Looking into the issue I found out that port 2701, which is required for remote control, was being blocked. Port listings for SCCM can be found here.

The Details

The following script will perform a port check on a destination of your choosing. This script utlizes Microsoft's PortQryUI utility.

For a first time run, the script will download and set up the required components necessary for exectution. The components will be saved in the directory that the script is executed from.


Once the necessary components are in place, you will be prompted to enter the following.

IP or FQDN - Examples Shown Below
Port(s) - Single and Muliple Ports Allowed
Transport Protocol - TCP, UDP or BOTH

When all of the variables are provided you will receive an output of the results shown below. The script can be rerun for additional ports in necessary.


Code Repository

Post a Comment

0 Comments