Tests Ports Between Devices

A set of cmdlets for testing connectivity between devices, can make use of powershell remoting and jobs.

Powershell Core compatible.

Testing Port Examples

Test TCP port from localhost

Test-PortConnectivity -Source 'localhost' -RemoteDestination 'dc1' -Port 57766

Continous port ping from localhost

Test-PortConnectivity '127.0.0.1' 'dc1' 57766 -Protocol TCP -Iterate

Test port from a remote machine to a destination

Test-PortConnectivity -Source server01.contoso.com -RemoteDestination server02.contoso.com -Port 135 -credential $credential

Result

Create Listening Port Examples

Create Listening Port on localhost

Publish-ListeningPort -port 443

Create Listening Port on localhost as background job

Publish-ListeningPort -port 443 -asjob

Create Listening Port on localhost and close after first connection to port

Publish-ListeningPort -port 443 -exitonconnect

Create Listening Port on remote machine as a background job and close on connect

Publish-ListeningPort -port 443 -remotedestination server01.contoso.com -exitonconnect -asjob -credential $credential

Listen Port