Modules and scope
Most cmdlets below ship in Windows client and server SKUs via NetTCPIP and DnsClient modules. They require PowerShell—typically Windows PowerShell 5.1 or PowerShell 7+—and often Administrator rights for state changes (flushing DNS, altering interfaces). Read-only views usually work as a standard user.
Cmdlets you will actually run
| Cmdlet | Replaces | Example |
|---|---|---|
Get-NetIPAddress | ipconfig addresses | Get-NetIPAddress -AddressFamily IPv4 | Sort-Object InterfaceIndex |
Get-NetIPConfiguration | ipconfig /all snapshot | Get-NetIPConfiguration | Format-List |
Get-NetRoute | route print | Get-NetRoute -DestinationPrefix '0.0.0.0/0' |
Get-NetTCPConnection | netstat -ano TCP | Get-NetTCPConnection -LocalPort 443 -State Listen |
Get-NetUDPEndpoint | netstat UDP | Get-NetUDPEndpoint | ? LocalPort -eq 53 |
Test-NetConnection | ping/telnet hybrid | Test-NetConnection example.com -Port 443 |
Resolve-DnsName | nslookup/dig | Resolve-DnsName example.com -Type MX |
Clear-DnsClientCache | ipconfig /flushdns | Run elevated when policy requires |
Get-DnsClientServerAddress | DNS server list per adapter | Get-DnsClientServerAddress -AddressFamily IPv4 |
Filtering and export
Pipe to Where-Object, project with Select-Object, and emit CSV/JSON for tickets. Because output is typed, you avoid brittle findstr on column-aligned text.
Limitations
Some advanced traces still need pktmon, netsh trace, or ETW. Cross-platform pwsh on Linux uses different cmdlet sets—verify availability with Get-Command before porting scripts.
Related: Windows networking commands, ipconfig explained, netstat explained, PowerShell vs CMD automation.