Description

A very simple and primitive network diagnostic script, runs through pings for DC, Default Gateway and web address (IP Addresses must be specified in place of 127.0.0.1). Clears DNS Cache and displays IP configuration.

Source Code

@ECHO OFF 
Set Organization=test 
ECHO This script performs some basic command line networking troubleshooting steps for Domain-joined machines at %organization%, press any key to start
Pause
ipconfig /flushdns
Pause
Ping 127.0.0.1
ECHO If successful, PC/laptop can reach %organization%'s PDC. If host cannot be reached, check network connection!
Pause
Ping 127.0.0.1
Echo This ping indicates connectivity to the Default Gateway
Pause
ping www.google.co.uk
ECHO This indicates if this machine is able to reach the internet. 
Pause
ipconfig /all
Pause

2 Spice ups

very simple, but it does what you. I’d be interested if you expanded it to expand the tests if it fails to connect to internet. For example if it can’t ping google, then try to ping the default gateway or another device inside the network.