Test-Connection: How to Ping Computers with PowerShell

You can use the commands below to ping computers with PowerShell.

 

Pinging a Single Computer

Test-Connection google.com

You may add (without the quotes) “-IPv4” to the end of the command to tell PowerShell to only ping the IPv4 address of the specified computer.

 

Pinging Multiple Computers

Use a comma [ , ] to specify multiple computers at once.

Test-Connection google.com, yahoo.com


Posted in Code Snippet, Computers, Internet and Servers, Operating Systems, PowerShell, Tips & Tutorials