Setting Up Your Environment
Prerequisites: Installing PowerShell 7
Terminal
- Windows — Windows Terminal (included with Windows 11, free in the Microsoft Store for Windows 10) gives tabs, better fonts, and copy and paste. Set PowerShell 7 as its default profile.
- macOS / Linux — any terminal; run
pwshto start PowerShell.
Editor
Visual Studio Code with the official PowerShell extension is the recommended editor: syntax highlighting, IntelliSense (autocomplete for commands, parameters, and properties), script analysis, and a debugger. Press F5 to run a script, or F8 to run just the selected lines in the integrated console.
(The older PowerShell ISE editor only supports Windows PowerShell 5.1 and is no longer developed.)
Keys that save time
- Tab — completes command names, parameters, file paths, and even property names. Press it repeatedly to cycle through options.
- Ctrl + Space — shows all completion options at once.
- ↑ / ↓ — command history; F8 searches it (and Ctrl + R does incremental search).
- Ctrl + C — stop a running command.
Your profile
$PROFILE is a script that runs every time PowerShell starts — the place
for your aliases, functions, and prompt settings:
# illustrative
$PROFILE
if (-not (Test-Path $PROFILE)) { New-Item -Path $PROFILE -ItemType File -Force }
code $PROFILE