Skip to content

Windows 11 Setup

1. Check your Windows version

Get-ComputerInfo -Property OsName, OsVersion, OsBuildNumber

Any Windows 11 build (22000 or later) is supported. Windows 10 22H2 works for almost everything, but it is not the documented target.

2. Windows Terminal

Windows Terminal is included in Windows 11. Open it with Win → Terminal. Recommended settings (Ctrl+,):

  • Startup → Default profile: PowerShell (PowerShell 7, after you install it).
  • Keep separate profiles for Windows PowerShell, PowerShell and Ubuntu.

3. Confirm Windows PowerShell 5.1

$PSVersionTable.PSVersion
$PSVersionTable.PSEdition    # Desktop

4. Install PowerShell 7

Follow PowerShell 7 Installation. The short version is:

winget install --id Microsoft.PowerShell --source winget
Install failed with Installer failed with exit code: 0x80072ee2?

0x80072EE2 is a network timeout. winget downloaded and verified the installer, but the MSI timed out while contacting Microsoft Update during setup. This is common behind proxies, firewalls, VPNs or on slow connections. Check your connection and retry. If it fails again, install without the Microsoft Update opt-in from an elevated terminal:

winget install --id Microsoft.PowerShell --source winget --override "/quiet /norestart ADD_PATH=1 USE_MU=0 ENABLE_MU=0"

The full explanation, alternatives (manual MSI, Store, ZIP) and log collection steps are in Troubleshooting Windows installation.

5. Install Git and Visual Studio Code

winget install --id Git.Git --source winget
winget install --id Microsoft.VisualStudioCode --source winget

Close and reopen the terminal afterwards so the updated PATH is loaded, then verify:

git --version
code --version

Recommended VS Code extensions: PowerShell (ms-vscode.powershell), ShellCheck (timonwong.shellcheck), WSL (ms-vscode-remote.remote-wsl), Markdown All in One.

6. Script execution policy (read before changing anything)

On Windows client editions the default execution policy is Restricted, so .ps1 scripts will not run. For this course set it for your user only to RemoteSigned. This allows your own local scripts and requires downloaded scripts to be signed or explicitly unblocked:

Get-ExecutionPolicy -List
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Execution policy is not a security boundary

Execution policy prevents accidental script execution and is not designed to stop attackers. Never set Unrestricted or Bypass machine-wide. Day 19 covers this in depth.

7. Create your practice folder

New-Item -Path $HOME\lpm-lab -ItemType Directory -Force

Do all Windows practice work inside $HOME\lpm-lab unless a lab says otherwise.

Verification

$PSVersionTable.PSVersion          # 5.1.x in Windows PowerShell
pwsh -NoProfile -Command '$PSVersionTable.PSVersion'   # 7.x
git --version
Get-ExecutionPolicy -Scope CurrentUser                 # RemoteSigned
Test-Path $HOME\lpm-lab                                # True