JAEN

PowerShell

Test-NetConnection

SafePing + port reachability

Test-NetConnection <host> -Port <n>

Like ping plus TCP port reachability and trace in one cmdlet.

Examples

  • Test-NetConnection smtp.example.com -Port 587Check SMTP port reachability

Syntax

Test-NetConnection <host> [-Port n] [-TraceRoute]

Before you run it

Read-only.

Used when you see

Cannot connect remotely / VPN
2
Check the portSSH/RDP/VPN port
See the whole flow →
Remote Desktop won't connect
1
Test reachability to port 3389
See the whole flow →
OneDrive sync is stuck
2
Test reachability to the sync endpointse.g. Test-NetConnection to the service endpoints on 443.
See the whole flow →
Can't connect to the database
1
Test reachability to the DB port
See the whole flow →

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store