9/6/19

Over the past few years I’ve been making a command prompt based tool that put all of the normal commands in one place. Feel free to copy this and modify it for yourself. Source Code:

Code:

@echo off
color 0A
title Ultimate Command Prompt All-in-One.

:start
echo Welcome, %USERNAME%
echo What would you like to do?
echo.
echo. -Shutdown Options-
echo.
echo 1. Shutdown in specified time
echo 2. Shutdown at a specified time
echo 3. Shutdown now
echo 4. Restart now
echo 5. Log off now
echo.
echo. -Defrag Options-
echo.
echo 6. Defrag (C:)
echo 7. Defrag (E:)
echo 8. Defrag (F:)
echo.
echo. -Detailed IP Information-
echo.
echo 9. IP Config (Full)
echo 10 IP Config -Release-
echo 11. IP Config -Renew-
echo 12. DNS Flush
echo.
echo. -Advanced Port and Routing-
echo.
echo 13. Netstat (Active Ports)
echo 14. Netstat (Connections + Active Ports)
echo 15. Netstat (Routing Table)
echo 16. ARP (Mac to IP correlation)
echo.
echo. -System File Checking-
echo.
echo 17. SFC Scan (Active Scan)
echo 18. SFC Scan (Boot Scan)
echo 19. Check Disk for Errors on C: (Without scanning for bad sectors)
echo 20. Check Disk for Errors on D: (Without scanning for bad sectors)
echo 21. Check Disk for Errors on E: (Without scanning for bad sectors)
echo 22. Check Disk for Errors on F: (Without scanning for bad sectors)
echo 23. Check Disk for Errors C: (With bad sector scanning)
echo 24. Check Disk for Errors D: (With bad sector scanning)
echo 25. Check Disk for Errors E: (With bad sector scanning)
echo 26. Check Disk for Errors F: (With bad sector scanning)
echo.
echo. -Active Directory Replication-
echo.
echo 27. Check FSMO Operation Master Status
echo 28. AD Replication Status of Domain Controllers in Domain
echo 29. AD Replication Summary (Detailed)
echo 30. AD Replication Knowledge Consistency Checker (Kerberos)
echo 31. AD Replication Syncing of Domain Controller Replication
echo 32. AD Replication Syncing of Domain Controller Replication (Forced)
echo.
echo. -Active Directory Group Policy-
echo.
echo 33. Group Policy Refresh
echo 34. Group Policy Refresh (Forced)
echo 35. Group Policy User Policy Results
echo 36. Group Policy Computer Policy Results
echo 37. Group Policy Summary (Detailed)
echo.
echo. -EXPERIMENTAL – Still Tested –
echo. -System Cleaner and Performance Enhancer-
echo.
echo 38. Windows Temporary Folder Deletion
echo 39. Delete Google Chrome Temporary Files
echo 40. Delete Firefox Temporary Files
echo 41. Delete Flash Temporary Files
echo.
echo. -Vulnerability Testing – Recon Footprinting-
echo.
echo 42. NSlookup MX (Mail)Records
echo 43. NSlookup A Records
echo 44. NSlookup NS (Name Server) Records
echo 45. NSlookup PTR (Reverse Lookup) Records
echo 46. NSlookup SOA (Start of Authority) Records
echo 47. NSlookup LOC (Geofencing, if available) Records
echo 0. Quit
echo.

set /p choice=”Enter your choice: ”
if “%choice%”==”1” goto shutdown
if “%choice%”==”2” goto shutdown-clock
if “%choice%”==”3” shutdown.exe -s -f
if “%choice%”==”4” shutdown.exe -r -f
if “%choice%”==”5” shutdown.exe -l -f
if “%choice%”==”6” defrag.exe c: -f
if “%choice%”==”7” defrag.exe e: -f
if “%choice%”==”8” defrag.exe f: -f
if “%choice%”==”9” ipconfig /all
if “%choice%”==”10” ipconfig /release
if “%choice%”==”11” ipconfig /renew
if “%choice%”==”12” ipconfig /flushdns
if “%choice%”==”13” netstat -a
if “%choice%”==”14” netstat -an
if “%choice%”==”15” netstat -r
if “%choice%”==”16” arp -a
if “%choice%”==”17” sfc /scannow
if “%choice%”==”18” sfc /scanonce
if “%choice%”==”19” chkdsk C: /f
if “%choice%”==”20” chkdsk D: /f
if “%choice%”==”21” chkdsk E: /f
if “%choice%”==”22” chkdsk F: /f
if “%choice%”==”23” chkdsk C: /r
if “%choice%”==”24” chkdsk D: /r
if “%choice%”==”25” chkdsk E: /r
if “%choice%”==”26” chkdsk F: /r
if “%choice%”==”27” netdom query fsmo
if “%choice%”==”28” repadmin /replsum
if “%choice%”==”29” repadmin /showrepl
if “%choice%”==”30” repadmin /kcc
if “%choice%”==”31” repadmin /syncall
if “%choice%”==”32” repadmin /syncall /force
if “%choice%”==”33” gpupdate
if “%choice%”==”34” gpupdate /force
if “%choice%”==”35” gpresult /Scope User /v
if “%choice%”==”36” gpresult /Scope Computer /v
if “%choice%”==”37” gpresult /z
if “%choice%”==”38” del /q/f/s %TEMP%\*
if “%choice%”==”39” goto Chrome-clear
if “%choice%”==”40” goto Firefox-clear
if “%choice%”==”41” goto Flash-clear
if “%choice%”==”42” goto NSlookup-MX
if “%choice%”==”43” goto NSlookup-A
if “%choice%”==”44” goto NSlookup-NS
if “%choice%”==”45” goto NSlookup-PTR
if “%choice%”==”46” goto NSlookup-SOA
if “%choice%”==”47” goto NSlookup-LOC
if “%choice%”==”0″ exit
echo Invalid choice: %choice%
echo.
pause
cls
goto start

:shutdown
cls
set /p min=”Minutes until shutdown: ”
set /a sec=60*%min%
shutdown.exe -s -f -t %sec%
echo Shutdown initiated at %time%
echo.
goto cancel

:NSlookup-MX
cls
set /p MX=”Mail Server Lookup of FQDN Address: ”
echo %MX%
nslookup -querytype=MX %MX%
echo.
pause
goto start

:NSlookup-A
cls
set /p A=”A Record Server Lookup of FQDN Address: ”
echo %A%
nslookup -querytype=A %A%
echo.
pause
goto start

:NSlookup-NS
cls
set /p NS=”Name Server Record Lookup of FQDN Address: ”
echo %NS%
nslookup -querytype=NS %NS%
echo.
pause
goto start

:NSlookup-PTR
cls
set /p PTR=”Reverse Pointer Lookup Server Record of FQDN Address: ”
echo %PTR%
nslookup -querytype=PTR %PTR%
echo.
pause
goto start

:NSlookup-SOA
cls
set /p SOA=”Start of Authority Address: ”
echo %SOA%
nslookup -querytype=SOA %SOA%
echo.
pause
goto start

:NSlookup-LOC
cls
set /p LOC=”GeoFencing Location of FQDN Server Address (if available): ”
echo %LOC%
nslookup -querytype=LOC %LOC%
echo.
pause
goto start

:shutdown-clock
echo.
echo the time format is HH:MM:SS (24 hour time)
echo example: 14:30:00 for 2:30 PM
echo.
set /p tmg=enter the time that you wish the computer to shutdown on:
schtasks.exe /create /sc ONCE /tn shutdown /st %tmg% /tr “shutdown.exe -s -t 00”
echo shutdown initiated at %tmg%
goto start
echo.

:Chrome-clear
cls
del /q /s /f C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\
pause
goto start
echo.

:Firefox-clear
cls
set FDir=C:\Users\%USERNAME%\AppData\Local\Mozilla\Firefox\Profiles
del /q /s /f “%FDir%”
rd /s /q “%FDir%”
del /q /s /f C:\Users\%USERNAME%\AppData\Roaming\Mozilla\Firefox\Profiles\*
pause
goto start
echo.

:Flash-clear
cls
set FCook=C:\Users\%USERNAME%\AppData\Roaming\Macromedia\Flashp~1
del /q /s /f “%FCook%”
pause
goto start

:cancel
set /p cancel=”Type cancel to stop shutdown: ”
if not “%cancel%”==”cancel” exit
goto start
cls
schtasks.exe /end /tn shutdown
cls
schtasks.exe /delete /tn shutdown
cls
echo Shutdown is cancelled.
echo.
pause.
exit

Download link: shorturl.at/eyF68

MD5 Hash: 371af5dd54aa998b8ea82d0a358fc295