December 11th, 2013

PowerTip: Find Net Route with PowerShell

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find a net route to a remote host.

Hey, Scripting Guy! Question How can I use the Find-NetRoute function in Windows 8.1 to find a route to a remote host if I do not have the IP address?

Hey, Scripting Guy! Answer Use the Resolve-DnsName command to find the IP address of the remote host,
          and feed the results to the Find-NetRoute command:

Find-NetRoute -RemoteIPAddress (Resolve-DnsName www.microsoft.com).ip4address

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.

Feedback