Good PowerShell IP troubleshooting cmdlets
Learn some useful cmdlets to troubleshoot IP
July 20, 2017
Q. What are some PowerShell IP troubleshooting cmdlets?
A. Below are some common cmdlets to help troubleshoot IP (along with their cmd equivalents)
Get-NetAdapter | View all the adapters (ipconfig /all - MAC information)
Get-NetIPAddress (optional -InterfaceAlias "" also -AddressFamily IPv4) | View IP configuration (ipconfig.exe)
Test-Connection | Runs a connectivity test (similar to ping)
Test-NetConnection | Checks connectivity including DNS lookup and connectivity
Test-NetConnection -TraceRoute | Shows the path to a target (tracert)
Resolve-Dnsname | Performs a DNS lookup (nslookup)
Register-DnsClient | Registers IP with DNS servers (ipconfig /registerdns)
Get-NetTCPConnection | View network connections (netstat)
Remember regular PowerShell can be used on the pipeline to manipulate the returned data. For example:
Get-NetIPAddress –AddressFamily IPv4 | Select-Object IPAddress, Type
Get-NetTCPConnection | Group State, RemotePort | Sort Count | FT Count, Name -Autosize
Get-NetTCPConnection | ? State -eq Established | FT -Autosize
About the Author
You May Also Like