:begin cls @echo off echo Swiss Army Chainsaw echo ******************* echo. echo (1) Ping x10 to TXT echo (2) NSLookup to TXT echo (3) Continuous Ping Onscreen echo (4) Ping Router/Server to TXT echo. echo (0) Exit echo ___________________ echo. set /p choice=Choice: echo. if %choice%==1 goto tping if %choice%==2 goto nslook if %choice%==3 goto sping if %choice%==4 goto rsping if %choice%==0 goto exit goto begin :tping echo This will ping the target and save results to file on desktop set /p ip=Address: cls echo Pinging, please wait... echo. echo A window will pop up with the results. ping -n 10 %ip% > "%systemdrive%%homepath%DesktopPING.txt" notepad "%systemdrive%%homepath%DesktopPING.txt" goto begin :nslook echo This will provide the DNS name for a given IP address. set /p ip=Address: cls echo Looking through DNS records, please wait... nslookup %ip% > "%systemdrive%%homepath%DesktopNSLOOK.txt" notepad "%systemdrive%%homepath%DesktopNSLOOK.txt" goto begin :sping echo This will ping the target continuously; use Ctrl+C to stop. set /p ip=Address: cls ping -t %ip% goto begin :rsping echo This will ping both the router and server. set /p srv=Server: set /p rtr=Router: cls echo Pinging, please wait... echo. ping %srv% > "%systemdrive%%homepath%DesktopPING.txt" ping %rtr% >> "%systemdrive%%homepath%DesktopPING.txt" notepad "%systemdrive%%homepath%DesktopPING.txt" goto begin :exit exit
In a technical support role I once held, we would routinely need to either ask non-technical people for technical information, or go through a series of steps to look it up ourselves.
Information like network latency times and packet loss were important to the network engineers but was seldom included in support tickets because there was no easy way to copy the output of a ping or tracert command.
In response, I created a script that automated a few of these tasks and presented the results in a format that we could easily copy and paste into the support ticket.
Project Info
Client: State Farm
Services
- Scripting
- Technical Support