I am trying to write a script where it will prompt you for a hostname, say 222012-DC01 from this it will resolve the ip address from dns via ping or nslookup.
It should then modify the ip address to ping the router for that site. If the ip address was 10.123.2.1 it should ping 10.123.1.1 for the router for that site.
The script should give you an output of server offline or router offline.
Work in an enviroment looking after several hundred sites, we take ownership of servers but not network incidents such as a router failure.
Your help is much appreciated…
In the future please post what you have got and tried.
Here is a tested script