I work for a MSP and we have lots of clients that have different internal IP addressing some 192.168.1. , 192.168.16. , and 10.1.1. I'm trying to find a way that you can ping the Default Gateway, DNS Server and DHCP from command line without knowing the IP address of the object beforehand. Trying to set this up to help connectivity troubleshooting with non-technical users so they'd have to click on a .bat icon instead of trying to spend time trying to get them to run CMD commands over the phone. During my scouring online I did find this .bat that works for finding the default gateway. I have no idea how to modify it to output the DNS Server or DHCP.
@Set title=Pinging the Default Gateway...
@(color 6A) & (@Title %title%)
@echo please wait...
::# Define a temp variable 'DefaultGateway'
@For /f "tokens=3" %%* in (
'route.exe print ^|findstr "\<0.0.0.0\>"'
) Do @Set "DefaultGateway=%%*"
::# Redirect output to a textfile
@> "pinggateway.txt" (
@echo [%Date% %time%] - %title%