February 25th, 2014

PowerTip: Use PowerShell to Count Hops to Server

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to count hops to a server.

Hey, Scripting Guy! Question On my computer running running Windows 8.1, how can I use Windows PowerShell to verify
          the number of hops to my server?

Hey, Scripting Guy! Answer Use the Test-NetConnection function and the –TraceRoute parameter,
          specify the server name, choose the TracerOut property, and get the count:

(Test-NetConnection -TraceRoute -ComputerName "www.contoso.com").traceroute.count 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.