CheatSheet - Windows

Synopsis: Quick Command Line Reference

Published July 15th, 2025
Last Modified: July 27th, 2025

Intro: Evergrowing cheat sheet for Windows Commands






Navigation Commands

Domain and WorkGroup Management --------- sysdm.cpl

New Admin User

net user /add tempAdmin Y1QvtMou!@
net localgroup administrators tempAdmin /add

Host File Manipulation

List host file to command window:
%WINDIR%\System32\Drivers\Etc\Hosts

Add 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

ROBOCOPY

Powershell script to use RoboCopy for bulk deletion:

$pathEmpty = "C:\EMPTY"
$pathTarget = "C:\TARGET FOLDER"
robocopy $pathEmpty $pathTarget /purge




Newest Post