CheatSheet - Windows
Synopsis: Quick Command Line Reference
Published July 15th, 2025
Last Modified: October 29, 2025
Intro: Evergrowing cheat sheet for Windows Commands
Quick Shutdown CMD ---------------------------
Add entry to host file:
Example:
Published July 15th, 2025
Last Modified: October 29, 2025
Intro: Evergrowing cheat sheet for Windows Commands
CMD
Domain and WorkGroup Management ---------sysdm.cplQuick Shutdown CMD ---------------------------
shutdown /rNew Admin User
net user /add tempAdmin PASSWORDnet localgroup administrators tempAdmin /add
FSMO
CMD: netdom query fsmoPS: Move-ADDirectoryServerOperationMasterRole "SERVERNAME" -OperationMasterRole 0,1,2,3,4 Host File Manipulation
List host file to command window: type %WINDIR%\System32\Drivers\Etc\HostsAdd entry to host file:
echo (IP ADDRESS) (DNS NAME) >> %WINDIR%\System32\Drivers\Etc\Hosts Example:
echo 8.8.8.8 google.com >> %WINDIR%\System32\Drivers\Etc\Hosts TimeZone
Set-TimeZone -Id "Eastern Standard Time" ROBOCOPY
Powershell script to use RoboCopy for bulk deletion:$pathEmpty = "C:\EMPTY"$pathTarget = "C:\TARGET FOLDER"robocopy $pathEmpty $pathTarget /purge