Skip to content

winget: make a Windows dev environment repeatable

Verified 1 min read

Use winget to search, install, upgrade and export Windows packages, build a reproducible manifest, and avoid supply-chain traps.

Tested onPro (26H2) · Build 26300.9457 · x64
E1
Build
26300.9457
Edition
Pro (26H2)
Architecture
x64
Support
Documentation (E1)
Evidence
E1Official documentation
Verified
2026-10-28
Page type
Task

winget is the Windows Package Manager. It installs from configured sources (typically winget and msstore) using package IDs. It is good for repeatable developer tools, not for pirated software or random scripts.

The workflow that matters:

  1. winget search to find the exact ID.
  2. winget install --id ... -e for a specific package.
  3. winget export to record what you have.
  4. winget import on a new PC.
  5. Re-check IDs/versions before trusting an old manifest.
Terminal window
winget --version
winget source list

If winget is missing, install App Installer from the Microsoft Store. On Windows Server, winget support is more limited; check the current docs.

Terminal window
winget search powershell
winget install --id Microsoft.PowerShell -e
winget upgrade --id Microsoft.PowerShell -e
winget upgrade --all
  • -e means exact ID; use it to avoid a similar-name package.
  • --scope machine installs for all users where the package supports it; otherwise it may be per-user.
  • --silent / --accept-package-agreements are convenient for automation; read what you are accepting.
  • winget list shows installed packages; winget upgrade shows available updates.
Terminal window
winget export -o C:\dev\packages.json
winget import -i C:\dev\packages.json

The export contains package IDs and source names, not the installer binaries. On a new PC:

  • review the JSON before importing;
  • remove packages you no longer use;
  • check whether a package needs a specific scope/version;
  • do not import a manifest from an untrusted repository.

For more complex setups, winget configure uses DSC configuration files. It is powerful and easy to over-apply; start with a small file and read the plan before applying.

  • Prefer the official winget/msstore sources.
  • Verify the package ID and publisher; a similar name can be a different product.
  • Do not add a random third-party source just to get one app.
  • Do not use winget to install cracked/pirated software.
  • Treat an imported manifest as code: it changes your machine.

Sources