SID-500

Home » PowerShell » The modern version of ping: Test-Connection

The modern version of ping: Test-Connection

Test-Connection is a very powerful PowerShell Cmdlet which sends ICMP Packets to test the reachability of a host. Like ping. But Test-Connection is much more. Lets play with the new ping command.

Ping multiple Hosts

Unlike ping you can test the connection to multiple hosts. Separate them by comma.

Test-Connection www.sid-500.com,192.168.0.105

1.PNG

Shut Up Mode

The world is loud enough 😉 This example shows how to run Test-Connection in Quiet Mode which results in suppressing details.

Test-Connection sid-500.com,192.168.0.105 -Quiet

2.PNG

True oder False. In this case both hosts are reachable.

Different Sources

With ping the source is always localhost. With Test-Connection you can specify the Source Computer.

Note that i am logged on server03 as a member of the Domain-Admins group. I set the source to dc01 and ping server03. Reverse Ping 😉

Test-Connection -Source dc01 -Destination server03

Unbenannt.PNG

By the way: ::1 is the IPv6 address of localhost like 127.0.0.1 in IPv4. You can also use PowerShell to talk to you: Speak to me: PowerShell tells you if a host is up or not (Test-Connection).

Further Information

Test-Connection tests the connectivity to a remote host. See also my blog post about Test-NetConnection: PowerShell: Playing with Test-NetConnection (ping, tracert, TCP Ports …)

For checking domain connectivity and name resolution see my articles

Checking connectivity to Active Directory: Test-ComputerSecureChannel and

The new nslookup: Resolve-DnsName


5 Comments

  1. […] Have fun discovering your neighbors! 😉 Also see my article: The modern version of ping: Test-Connection. […]

    Like

  2. […] For checking name resoultion and network connectivity see also: The new nslookup: Resolve-DnsName and The modern version of ping: Test-Connection. […]

    Like

  3. […] checking network and domain connectivity see my articles The modern version of ping: Test-Connection and Checking connectivity to Active Directory: […]

    Like

  4. […] See also my article about Test-Connection: The modern version of ping: Test-Connection. […]

    Like

  5. […] Hope this helps for troubleshooting and for testing the connectivity. The “smaller” version of this command is Test-Connection: The modern version of ping: Test-Connection. […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Who is the blogger?

My name is Patrick GrĂźnauer (pewa2303). I am from Austria. On sid-500 I write about Windows, Cisco and IT-Security in English and German. Have fun while reading!

Patrick Gruenauer
Follow SID-500 on WordPress.com