NetTCPIP module: setup and commands
Documentation: Microsoft Learn
Diagnose addresses, routes and TCP connections with Get-NetIPAddress, Get-NetRoute and Get-NetTCPConnection using the correct interface context.
Getting it
Ships with Windows 8 and Windows Server 2012 onward and loads on demand. There is no equivalent module on Linux or macOS.
Examples
Show reference output
Show reference output
What it is for
Use it to answer whether an address, a route, or a listening socket is what you expected. Test-NetConnection is the quickest way to separate a name resolution problem from a port reachability problem in a single call.
Typical tasks
- List IPv4 addresses per interface
- Inspect the default route and its metric
- Find which process owns a listening port
- Test a TCP port against a remote host
- Group established connections by remote address
- Check for duplicate or tentative addresses
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Use it to answer whether an address, a route, or a listening socket is what you expected. Test-NetConnection is the quickest way to separate a name resolution problem from a port reachability problem in a single call.