Make a User
Two lines to create a new user and give it local admin in a CMD window, only really useful for making admin accounts since Azure took over.
net user <username> <password> /addnet localgroup administrators <username> /addRelated: To change a password it’s just:
Net user <username> <password>Set a computer to not sleep when plugged in:
powercfg /x -standby-timeout-ac 0Force restart a computer
When someone’s getting fired change their password with the above and then hit em with this.
shutdown /r /t 0 /f Note: The /r means restart, the /t 0 means ‘In 0 seconds’ and the /f means force. So if you just want to shut it down you can figure it out
Scan the file system
sfc/scannowIt does something I think, mostly it just leaves a processing CMD window on the client screen. Great if you want to get a coffee, nobody questions a processing CMD window.
Write text to a file
Put text into a new file:
echo type what you want here > C:\myfile.txtAdd text to an existing file (append instead of overwrite):
echo type what you want here >> C:\myfile.txtCheck external IP
curl ifconfig.meDownload a file with curl
curl -L -o "C:\destination\path" "https://example.com/file.pdf"