Ping, IPConfig and Tracert as PowerShell commands

If you work a lot with the command prompt under Windows, you are certainly familiar with the PING , IPCONFIG and TRACERT commands . Numerous reports have dealt very precisely with the ping command and its parameters or showed you how you can only log the ping dropouts .

In this article we would like to go into more detail how you can issue these commands very easily and quickly as PowerShell commands . PowerShell is increasingly replacing the MS-DOS command prompt and thus also these commands. As you can see, these commands are also very memorable and quick to use as PowerShell commands.

IPConfig as PowerShell command “Get-NetIPConfiguration”

With IPConfig you can easily view the current network configuration. The adequate PowerShell command for IPConfig is

Get-NetIPConfiguration

Below you can see the output of the command on a notebook that is connected via WLAN.

Get-NetIPConfiguration

Here you can see the details of the network name (InterfaceAlias), the interface description, the name of the WLAN and the IP addresses with gateway and DNS server. The nice thing is that you only have to enter ” Get-NetIP ” and then press the TAB key, because then the command is written out correctly.

Ping as PowerShell command “Test-NetConnection”

The ping command also exists as a PowerShell command and is called

Test-NetConnection ADDRESS

We have listed below the command that pings our Windows FAQ blog. In addition to the computer name, you can also see the remote IP address, the source address of your PC and whether the ping was successfully carried out and how many milliseconds were required for the response.

Test NetConnection

Tracert as a PowerShell command

You can also display Tracert using the PowerShell. It is the same command as the ping command, but a parameter is added. The complete Tracert PowerShell command is then:

Test-NetConnection ADDRESS -TraceRoute

After the execution, this looks like this.

Test-NetConnection -TraceRoute

As you can see, the display is very similar to the ping instruction . Only the individual hops of the tracer route are listed.

Overall, the PowerShell commands are not much more complicated than the well-known Windows commands, they simply have to be memorized through frequent use.

If you are interested in other PowerShell commands , we recommend the following posts.

– Read WindowsUpdate.log on Windows 10 or reformat it with PowerShell – Install
Windows roles and features with PowerShell

Read out computer system information with PowerShell – Prepare the Windows client for remote PowerShell commands with WINRM – Edit
local users and groups with PowerShell
– Determine Windows system runtime with PowerShell
– Create Windows 10 system restore point with PowerShell

Shut down and restart Windows with PowerShell commands – Repair Windows component stores with DISM and PowerShell commands
– Switch off UAC (user account control ) with PowerShell or registry with Windows 10
– PowerShell command to Disable the firewall

administrator