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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store