Windows

73 cheat sheets.

73/73

yt-dlp

Downloading video and audio from YouTube and hundreds of other sites with yt-dlp — formats, playlists, subtitles, post-processing, and config.

05-26-2026#yt-dlp#windows#video

xcopy

Copy files and directory trees with attribute preservation, date filtering, exclusion lists, and verification. The step between copy and robocopy for most scripting needs.

05-26-2026#xcopy#windows#cli

WSL Interoperability

Running Linux tools from Windows and vice versa, file system access, and networking between WSL and Windows.

05-26-2026#wsl#linux#windows

wsl

Install, list, export, import, configure, and clone WSL distributions using the wsl.exe command on Windows 10 and 11.

05-26-2026#wsl#linux#virtualization

wmic

Query and manage Windows system information — hardware, software, processes, services, and more — from the command prompt using WMI classes and WMIC's SQL-like syntax.

05-26-2026#wmic#windows#cli

winget Package Manager

Installing, upgrading, and managing packages with Windows Package Manager.

05-26-2026#winget#windows#packages

Windows Terminal

Configure Windows Terminal — settings.json structure, profiles for pwsh/cmd/wsl/ssh, keybindings, colour schemes, panes, and the wt.exe CLI.

05-26-2026#terminal#productivity#customization

whoami

Display the current user name, SID, group memberships, and privileges from the Windows command prompt — essential for auditing security context in scripts and support scenarios.

05-26-2026#whoami#windows#cli

wevtutil

Query, export, clear, and manage Windows Event Log channels from the command line — the primary CLI for event log automation, log archiving, and scripted log analysis on Windows.

05-26-2026#wevtutil#windows#cli

tzutil & w32tm

Read and set the system timezone with tzutil, then query, configure, and force-sync the Windows Time service with w32tm — including NTP peer configuration and Kerberos-clock-drift recovery.

05-26-2026#tzutil#w32tm#windows

tracert

Trace the sequence of routers between your machine and a destination by sending probes with increasing TTL values — the go-to tool for locating where a network path breaks or introduces high latency.

05-26-2026#tracert#windows#cli

timeout

Pause a batch script for a specified number of seconds with an optional keypress bypass — a reliable replacement for the ping-delay idiom and a safer alternative to sleep in Windows CMD scripts.

05-26-2026#timeout#windows#cli

tasklist

Display all running processes on a local or remote Windows machine with PID, memory usage, session, and optional service or module details — the cmd.exe equivalent of Task Manager for scripts.

05-26-2026#tasklist#windows#cli

taskkill

End one or more running Windows processes by PID or image name from the command prompt, with options for force termination, process tree killing, filtering, and remote targets.

05-26-2026#taskkill#windows#cli

takeown

Transfer ownership of files and directories to the current user or the Administrators group from an elevated command prompt — a prerequisite for modifying ACLs on system-protected paths.

05-26-2026#takeown#windows#cli

systeminfo

Display detailed OS, hardware, and network configuration for the local or a remote Windows machine. Covers output formats, remote querying, filtering, and parsing in scripts.

05-26-2026#systeminfo#windows#cli

Sysinternals

Bootstrap and drive the headless Sysinternals utilities — PsExec, Handle, PsList, Autoruns, ProcMon, ListDLLs — for process spelunking, file-lock hunting, autostart auditing and scripted system tracing on Windows.

05-26-2026#sysinternals#debugging#sysadmin

ssh

Connect to remote hosts, transfer files, and forward ports over an encrypted channel using the OpenSSH client built into Windows 10 and later.

05-26-2026#ssh#windows#cli

shutdown

Initiate, schedule, abort, or force a shutdown, restart, logoff, hibernate, or sleep on a local or remote Windows machine from the command line — essential for scripted maintenance, patch automation, and remote administration.

05-26-2026#shutdown#windows#cli

set

Set, display, and delete cmd.exe environment variables within the current session, perform integer arithmetic with /A, and read interactive user input with /P.

05-26-2026#set#windows#cli

Scoop

Install dev tools without admin rights using Scoop — buckets, manifests, multi-version installs, and reproducible setups.

05-26-2026#scoop#package-manager#dev-tools

schtasks

Create, query, run, end, and delete scheduled tasks on local or remote Windows machines from the command prompt — the scripting interface to Windows Task Scheduler.

05-26-2026#schtasks#windows#cli

sc

Query, create, configure, start, stop, and delete Windows services from the command line — the scripting interface to the Service Control Manager, equivalent to the Services MMC snap-in but fully automatable.

05-26-2026#sc#windows#cli

runas

Launch a program in the security context of a different user account — elevate to Administrator, switch to a service account, or test application behaviour under a restricted identity.

05-26-2026#runas#windows#cli

route

Display, add, delete, and modify entries in the Windows IP routing table — control how packets are forwarded between subnets, add persistent static routes, and diagnose routing failures.

05-26-2026#route#windows#cli

robocopy

Production-grade file and directory synchronisation with mirroring, multi-threading, retry logic, logging, and exclusion filters. The go-to for backup scripts and deployment pipelines on Windows.

05-26-2026#robocopy#windows#cli

rmdir / rd

Delete empty or entire directory trees from the Windows command prompt. Covers the /S and /Q flags, force-removing read-only trees, and safe deletion patterns.

05-26-2026#rmdir#windows#cli

reg

Query, add, modify, export, and import Windows registry keys and values with the built-in reg.exe — the scriptable, no-dependency tool for everything from one-off tweaks to full backup-and-restore.

05-26-2026#reg#registry#cli

PowerShell Scripting

Author production-grade PowerShell: advanced functions with [CmdletBinding()], parameter validation, pipeline-bound parameters, splatting, switch parameters, .ps1 vs .psm1, and all the control-flow constructs.

05-26-2026#powershell#scripting

PowerShell Remoting

Execute PowerShell against one or many remote hosts using WinRM or SSH transport, persistent sessions, credential management, and JEA.

05-26-2026#powershell#networking#remoting

PowerShell Pipelines

Deep dive on PowerShell's object pipeline: Where-Object, Select-Object, ForEach-Object, Sort-Object, Group-Object, Measure-Object, Compare-Object, Out-GridView, parallel execution, and the two filter forms.

05-26-2026#powershell#scripting#pipelines

PowerShell Modules

Install, discover, update, and author PowerShell modules: PowerShellGet, PSResourceGet, the Gallery, $PSModulePath, $PROFILE customisation, PSReadLine, SecretManagement, and the must-have module shortlist.

05-26-2026#powershell#modules#ecosystem

PowerShell Essentials

Variables, operators, pipelines, Where-Object, ForEach-Object, Select-Object, sorting, grouping, remoting, jobs, CIM, registry, JSON, error handling, and common cmdlets.

05-26-2026#powershell#windows#scripting

PowerShell Error Handling

Master terminating vs non-terminating errors, $ErrorActionPreference, try/catch/finally, throw vs Write-Error, transcripts, and strict mode.

05-26-2026#powershell#scripting#errors

PowerShell Built-in Variables

Complete reference for every automatic and preference variable built into PowerShell — $_, $Error, $MyInvocation, $PSCmdlet, $Host, $PSVersionTable, $ExecutionContext, and all preference variables that tune runtime behaviour.

05-26-2026#powershell#variables#reference

powercfg

Manage Windows power plans, enable or disable hibernation, diagnose battery health and sleep failures, and generate energy efficiency reports from the command prompt.

05-26-2026#powercfg#windows#cli

ping

Send ICMP echo requests to a host to test reachability, measure round-trip latency, and detect packet loss from the Windows command prompt.

05-26-2026#ping#windows#cli

pathping

Trace the route to a destination and measure per-hop packet loss and latency over a sustained sampling period — more diagnostic than tracert and more thorough than ping for identifying intermittent network problems.

05-26-2026#pathping#windows#cli

nslookup

Query DNS servers for A, AAAA, MX, TXT, NS, PTR, and other resource records from the Windows command prompt — the built-in tool for diagnosing name resolution issues.

05-26-2026#nslookup#windows#cli

netstat

Display active TCP/UDP connections, listening ports, routing tables, interface statistics, and per-connection process IDs from the Windows command prompt.

05-26-2026#netstat#windows#cli

netsh

Configure network interfaces, firewall rules, wireless profiles, port proxies, and Winsock settings from an elevated command prompt — the comprehensive Windows network configuration CLI.

05-26-2026#netsh#windows#cli

net user

Create, modify, delete, and list local Windows user accounts from the command prompt — set passwords, manage account expiry, lock/unlock accounts, and control logon hours.

05-26-2026#net-user#windows#cli

net localgroup

Create, delete, and modify local security groups on a Windows machine — add or remove members, list group memberships, and manage built-in groups from the command prompt.

05-26-2026#net-localgroup#windows#cli

move

Move files to a new location or rename them within the Windows command prompt. Covers single files, wildcards, directory renames, overwrite control, and cross-drive behaviour.

05-26-2026#move#windows#cli

mountvol

List, create, and remove NTFS volume mount points and display the unique volume GUID path for any drive letter or directory junction from the command prompt.

05-26-2026#mountvol#windows#cli

mkdir / md

Create one or more directories from the Windows command prompt. Covers single and nested directory creation, batch patterns, and common scripting idioms.

05-26-2026#mkdir#windows#cli

logman

Create, start, stop, and manage Data Collector Sets for performance counters, event traces, and configuration data — the command-line interface to Windows Performance Monitor for scripted monitoring and automated log collection.

05-26-2026#logman#windows#cli

ipconfig

Display and manage TCP/IP network configuration for all adapters on a Windows machine — covers full adapter details, DNS cache operations, and DHCP lease management.

05-26-2026#ipconfig#windows#cli

icacls

Display and modify NTFS access control lists on files and directories — grant, deny, or remove permissions for users and groups, manage inheritance, and save or restore full ACL sets.

05-26-2026#icacls#windows#cli

hostname

Display the DNS hostname of the local Windows machine from the command prompt — useful in scripts to identify the machine without parsing systeminfo output.

05-26-2026#hostname#windows#cli

gpresult & gpupdate

Inspect the Resultant Set of Policy that applied to a user and computer with gpresult, then force a refresh with gpupdate — including HTML reports, scope filtering, and the classic 'why didn't my GPO take effect?' workflow.

05-26-2026#gpresult#gpupdate#windows

getmac

Display the MAC (hardware) addresses and associated transport names for all network adapters on a local or remote Windows machine — useful for asset inventory, DHCP reservation setup, and network access control.

05-26-2026#getmac#windows#cli

fsutil

Inspect and manage NTFS file system internals — query volume info, manage hard links, sparse files, reparse points, the USN journal, and the dirty bit — from an elevated command prompt.

05-26-2026#fsutil#windows#cli

findstr

Search for string patterns inside files or piped input on Windows — the built-in grep equivalent for cmd.exe, with support for regular expressions, case-insensitive matching, and recursive directory searches.

05-26-2026#findstr#windows#cli

fc

Compare two text or binary files line-by-line or byte-by-byte and report their differences — the built-in Windows equivalent of Unix diff for quick file audits in cmd.exe.

05-26-2026#fc#windows#cli

echo

Print text to stdout, expand environment variables, write blank lines, redirect output to files, and toggle command-echoing in cmd.exe batch scripts.

05-26-2026#echo#windows#cli

driverquery

Display all installed device drivers on a local or remote Windows machine — module name, type, link date, and driver file path — for hardware audits and troubleshooting.

05-26-2026#driverquery#windows#cli

dism

Service Windows images and the running OS — enable/disable optional features, repair the component store, mount and edit WIM/ESD images, add drivers, and manage editions from an elevated command prompt.

05-26-2026#dism#windows#cli

diskpart

Create, delete, format, extend, shrink, and assign drive letters to disk partitions from the Windows command prompt using an interactive or scripted REPL interface.

05-26-2026#diskpart#windows#cli

dir

Display files and folders in a directory with filtering, sorting, formatting, and recursive traversal options. The Windows cmd.exe equivalent of Unix ls.

05-26-2026#dir#windows#cli

del

Delete one or more files from the Windows command prompt. Covers wildcards, quiet mode, attribute overrides, recursive deletion patterns, and the distinction from rmdir.

05-26-2026#del#windows#cli

defrag

Analyze, defragment, and optimize volumes from the command line — consolidate free space on HDDs, issue TRIM on SSDs, and schedule or review optimization tasks.

05-26-2026#defrag#windows#cli

copy

Copy one or more files to a new location in the Windows command prompt. Covers single-file copy, wildcard batches, file concatenation, and binary vs ASCII modes.

05-26-2026#copy#windows#cli

cls

Clear all text from the cmd.exe or PowerShell console window and reset the cursor to the top-left — the single command for resetting a terminal session's visible output.

05-26-2026#cls#windows#cli

Chocolatey

Install, upgrade, pin, and script software installs on Windows with the choco CLI, packages.config files, and custom sources.

05-26-2026#chocolatey#choco#package-manager

chkdsk

Scan a FAT or NTFS volume for file system errors and bad sectors, optionally repairing them — the built-in Windows disk health and integrity tool for drives and volumes.

05-26-2026#chkdsk#windows#cli

certutil

The dual-purpose Windows CLI for certificate-store management and as the most reliable built-in tool for file hashing, base64 encoding, and CRL/CTL handling — no install required.

05-26-2026#certutil#certificates#security

cd

Navigate the Windows command prompt's current working directory. Covers drive switching, absolute and relative paths, UNC paths, and path-with-spaces quoting.

05-26-2026#cd#windows#cli

beets Music Organizer

Importing, tagging, querying, and organizing a music library with beets — config, plugins, queries, and common workflows on Windows.

05-26-2026#beets#windows#music

bcdedit

View and modify the Windows Boot Configuration Data store — manage boot entries, set default OS, change timeouts, enable debugging, and configure boot options from an elevated command prompt.

05-26-2026#bcdedit#windows#cli

attrib

View and modify Windows file attributes (hidden, read-only, system, archive) from the command line. Covers all attribute flags, recursive operations, and practical recipes for unhiding malware-hidden files and managing backups.

05-26-2026#attrib#windows#cli

arp

Display, add, and delete entries in the Windows ARP (Address Resolution Protocol) cache — map IP addresses to MAC addresses, detect IP conflicts, and diagnose Layer 2 connectivity issues.

05-26-2026#arp#windows#cli

Windows

PowerShell, winget, WSL interop, yt-dlp, beets, and Windows administration.

04-23-2026#windows#powershell#cli