Commonly Used Network Troubleshooting Commands

In this blog post I will show you some basic network troubleshooting commands both using the command line tools and PowerShell as well.

1/ Check TCP/IP configurations using command prompt

With the ipconfig command, we can check the status of the computer’s network interfaces as well as their TCP/IP configurations. To see the command in action, launch the command prompt and type

ipconfig /all

Check TCP/IP configurations using PowerShell

We can perform the same as above with PowerShell using the following cmdlet:

Get-NetIPAddress | FT

2/ Ping using the command prompt

Ping is used to test the availability of the remote host. Sometimes ping is not an appropriate tool to test availability as administrators tend to block ping replies for security reasons. To use ping, type the following at the command prompt.:

ping

We can also use the –t switch to keep the ping continuously going.

ping –t google.com

To stop the ping from going on, press Ctrl+C on the keyboard.

Ping using Windows PowerShell

Test-NetConnection | FL

3/ Trace route using the command prompt:

tracert

Trace route using PowerShell

Test-NetConnection –TraceRoute

4/ Obtain routing information using the command prompt

route print

Obtain routing information using Windows PowerShell

Get-NetRoute

5/ DNS lookup using command prompt

nslookup

DNS lookup using Windows PowerShell

Resolve-DNSName

In this blog post I have shown you a few frequently used commands to troubleshoot network issues. The commands are a bit different in PowerShell than in the native command prompt line tool but they serve the same purpose.