The Mindset
On Windows you’ll work through one of several interfaces depending on how you got your shell. Each has strengths:- CMD — the classic command prompt. Limited, but present everywhere and great for quick enumeration
- PowerShell — the powerful one. Full access to .NET, WMI, and the entire system. This is where serious work happens
- WMI — not a shell but an interface into nearly every aspect of the system, queryable from both CMD (
wmic) and PowerShell
CMD — The Command Prompt
The traditional interpreter. You’ll often get a CMD shell first from an exploit, then upgrade to PowerShell.Core Commands
findstr — The Windows grep
PowerShell — The Real Tool
PowerShell is object-oriented (commands return objects, not just text) and gives you full access to the system. This is where you do credential hunting, enumeration scripts, and most offensive tooling.Cmdlet Naming — Verb-Noun
PowerShell commands follow aVerb-Noun pattern, which makes them discoverable:
Common Aliases
PowerShell aliases many cmdlets to familiar CMD and Linux commands, so muscle memory carries over:Discovery — Finding What You Need
Pipeline & Filtering
Because PowerShell passes objects, you filter on properties, not text:Execution Policy
PowerShell’s execution policy restricts which scripts can run. It’s not a security boundary — it’s trivial to bypass, and you’ll need to when running enumeration scripts.WMI — Windows Management Instrumentation
WMI is an interface to almost every part of the system — hardware, OS, processes, services, installed software. You query it when you need detailed system info, and it’s available from both CMD and PowerShell.From CMD — wmic
From PowerShell — Get-WmiObject / Get-CimInstance
Quick Reference
CMD
PowerShell
WMI
Next: Processes & Services — finding running processes, abusing service misconfigurations, and dumping credentials from memory.