PowerToys and winget
Guide to a repeatable Windows setup with winget (package management) and Microsoft PowerToys (window management, launcher, OCR, batch rename).
winget (Windows Package Manager) and Microsoft PowerToys replace click-through Windows setup with scripts you can run again on any machine. This answers “how do I use Windows like a pro.”
Setup flow
Steps
- Verify winget. It ships with Windows 11 and modern Windows 10 (build 1809+) via App Installer. If missing, get it from the Microsoft Store or run
Repair-WinGetPackageManagerin PowerShell. - Search before you script.
winget search <name>to confirm a package exists,winget show <id>to check the installer type/version. - Install PowerToys.
It auto-updates via the Microsoft Store.winget install Microsoft.PowerToys - Batch-install your core toolset non-interactively:
winget install --id <id> --exact --silent --accept-package-agreements --accept-source-agreements - Export a reference machine’s setup:
The JSON is human-readable and safe to commit to a dotfiles repo.winget export -o applist.json - Configure PowerToys Run (default
Alt+Space): enable the plugins you actually use (Shell, Calculator, Windows Settings) and disable the rest to keep search latency low. - Set up FancyZones (
Win+Shift+\``): build a Grid/Canvas layout per monitor, optionally bind hotkeys (Win+Ctrl+Alt+`) to jump between layouts. - On a new machine, import:
winget import applist.json --ignore-versions --accept-package-agreements - Turn on Command Not Found in PowerToys settings. When a PowerShell 7 command isn’t found, it suggests the winget package that provides it.
Tips
- Use
--include-versionswhen exporting a pinned reference build. Use--ignore-versionson import so you get newer stable releases instead of version mismatches. - Store
applist.jsonin your dotfiles repo alongside a short note on what each tool is for. - If you run many windows, enable FancyZones’ “Override Windows Snap.” It remaps
Win+Arrowto zone navigation. - PowerToys’ Environment Variables editor supports named profiles (e.g. a
Java_Devprofile) you toggle on/off instead of hand-editingPATH. - Text Extractor needs the OCR language pack installed, check with
Get-WindowsCapability -Online | Where-Object {$_.Name -Like 'Language.OCR*'}.
Common pitfalls
winget exportonly captures winget-catalog packages: Microsoft Store apps and unlisted third-party tools are silently skipped; list those separately.- Running from a non-admin prompt: installs needing elevation fail silently; test elevated first.
--ignore-versionson import can pull in a breaking newer release; pin with--include-versionsfor anything critical.- FancyZones won’t snap elevated windows (e.g. an admin Terminal) unless PowerToys itself runs as administrator.
- Environment Variables profiles are User-scope only: System variables need admin mode. People often miss this when they switch contexts.
- Large
applist.json(100+ apps) slows down import, split intoessentials.json/dev-tools.jsonand import in stages. winget importcontinues past failures by default, check the log at%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDirto confirm that every package installed.
Related
Sources
- Windows Package Manager (winget) Overview
- winget export command documentation
- winget install command documentation
- Microsoft PowerToys - Overview and utilities
- PowerToys Run quick launcher
- FancyZones window manager
- PowerRename bulk file renaming
- Text Extractor OCR utility
- Command Not Found PowerShell module
- Environment Variables editor