Diego Barros Araya
All notes

PowerToys and winget

Guide to a repeatable Windows setup with winget (package management) and Microsoft PowerToys (window management, launcher, OCR, batch rename).

Updated · windows, tooling

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

Verify winget is available
(built into Win11 / App Installer)

winget search / winget show
to confirm package IDs

winget install Microsoft.PowerToys

Batch-install core tools
winget install id1 id2 id3 --silent

winget export -o applist.json
on a reference machine

Configure PowerToys Run
(Alt+Space launcher)

Set up FancyZones
window layouts

On a new machine:
winget import applist.json

Steps

  1. 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-WinGetPackageManager in PowerShell.
  2. Search before you script. winget search <name> to confirm a package exists, winget show <id> to check the installer type/version.
  3. Install PowerToys.
    winget install Microsoft.PowerToys
    It auto-updates via the Microsoft Store.
  4. Batch-install your core toolset non-interactively:
    winget install --id <id> --exact --silent --accept-package-agreements --accept-source-agreements
  5. Export a reference machine’s setup:
    winget export -o applist.json
    The JSON is human-readable and safe to commit to a dotfiles repo.
  6. 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.
  7. Set up FancyZones (Win+Shift+\``): build a Grid/Canvas layout per monitor, optionally bind hotkeys (Win+Ctrl+Alt+`) to jump between layouts.
  8. On a new machine, import:
    winget import applist.json --ignore-versions --accept-package-agreements
  9. 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-versions when exporting a pinned reference build. Use --ignore-versions on import so you get newer stable releases instead of version mismatches.
  • Store applist.json in 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+Arrow to zone navigation.
  • PowerToys’ Environment Variables editor supports named profiles (e.g. a Java_Dev profile) you toggle on/off instead of hand-editing PATH.
  • Text Extractor needs the OCR language pack installed, check with Get-WindowsCapability -Online | Where-Object {$_.Name -Like 'Language.OCR*'}.

Common pitfalls

  • winget export only 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-versions on import can pull in a breaking newer release; pin with --include-versions for 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 into essentials.json / dev-tools.json and import in stages.
  • winget import continues past failures by default, check the log at %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir to confirm that every package installed.

Sources