Do you know a way to test if an HTTP server is reachable with a specific nic ?

My scenario is the following : our company is using laptop for all our employees. To use the network we can either use the wired Ethernet LAN or the WiFi. So all computers have two NICS with a preferred route to the wired lan. Everything is working fine most of the time but I would like to have (ideally) a Powershell command to test if the wireless network is able to reach an http server.

I'm looking for an HTTP equivalent of :

ping google.com -S WiFi_IP_Address

Many thanks,

P.S. Telnet is not installed on our computers and will not.


Sorry, I asked to quickly ...

I failed to completely read and understand the Microsoft doc. Here is the solution.

First retrieve the interface index :


And then :

Test-NetConnection -ComputerName google.com -DiagnoseRouting -InformationLevel Detailed -ConstrainInterface _INTERFACE_INDEX_

Where _INTERFACE_INDEX_ was retrieved previously.

Hope this can help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.