winget: install and update every Windows app in seconds

winget: install and update every Windows app in seconds

Reimaging a work PC and then having to install Chrome, 7-Zip, VLC, Visual Studio Code, Notepad++, Git and ten other programs — one by one, each with its own installer, each with the blessed "next, next, finish" — is the kind of thing that costs any sysadmin 40 minutes and adds nothing. winget solves exactly that: one command, every program installed.

What winget is

winget (Windows Package Manager) is Microsoft's official package manager, available by default on Windows 11 and on Windows 10 version 1709 or later. It works much like apt on Debian or brew on macOS: you search for a package by name, install it with one command, and the system handles the download, the verification and the installation — no pop-ups, no graphical wizards, no unwanted toolbar bundled into the installer.

The default repository (winget-pkgs) holds more than 6,000 packages, including the ones developers and sysadmins use most. The Microsoft Store acts as a secondary source, configured automatically.

How to check whether winget is available

Open PowerShell or Command Prompt and run:

winget --version

If it returns something like v1.11.x, you're ready to go. If you get "command not recognised", install App Installer from the Microsoft Store or update Windows to a recent build — winget has been bundled since Windows 11 21H2.

The essential day-to-day commands

Search for a package

winget search vlc

Returns a table with the name, package ID, version and source. The ID is what you use for exact installs — it avoids ambiguity when several packages have similar names. For example: VideoLAN.VLC rather than just "vlc".

Install one or several programs

winget install VideoLAN.VLC

To install several at once on the same line:

winget install Google.Chrome Mozilla.Firefox 7zip.7zip Git.Git Microsoft.VisualStudioCode

winget processes each package in sequence, downloading and installing with no manual interaction.

List installed programs

winget list

Shows every package winget recognises on the system, with the installed version and the available version. Handy for auditing what's out of date before running the upgrade.

Uninstall

winget uninstall VideoLAN.VLC

How do you update every Windows program at once?

Use winget upgrade --all. It checks every recognised package and updates the ones with a new version available — without opening a single program manually.

For use in scripts with no user interaction, add the automation flags:

winget upgrade --all --silent --accept-package-agreements --accept-source-agreements
  • --silent — no graphical windows during installation
  • --accept-package-agreements — accepts licence terms automatically
  • --accept-source-agreements — accepts the terms of the configured sources

Run it with administrator privileges to update packages installed for all users of the machine.

Export and Import: migrating your setup to another PC

This is winget's least-known feature and one of the most useful in practice. Before reimaging or moving to a new machine, export the list of everything installed:

winget export -o C:\backup\my-apps.json

The generated JSON file lists every package winget recognises. On the new PC, once Windows is installed, restore everything with:

winget import -i C:\backup\my-apps.json --accept-package-agreements

winget installs the lot in one go. Programs that aren't in the repository — corporate software, specific drivers, legacy applications — don't make it into the JSON and still need installing by hand. But most of a standard developer or analyst setup is covered effortlessly.

Automating updates with Task Scheduler

To keep machines up to date with no intervention, create a scheduled task. Save the following to C:\Scripts\winget-update.ps1:

winget upgrade --all --silent --accept-package-agreements --accept-source-agreements

In Task Scheduler, create a task that runs PowerShell with that script, with elevated privileges:

powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\winget-update.ps1"

Set it to run at 3am on Sunday, when the workstation is likely idle. In environments with multiple workstations, you can distribute the script via GPO or Microsoft Intune.

If you're still using PowerShell at a basic level, this scheduled task is a natural entry point into real automation: one file, one schedule rule, dozens of programs kept up to date without touching the mouse.

Quick tips

  • Specific version: winget install Git.Git --version 2.44.0
  • Install scope: --scope user installs for the current user only; --scope machine for everyone
  • Force a reinstall: add --force to install
  • Details of a package: winget show Git.Git
  • Include packages with an unknown version in the upgrade: --include-unknown

winget or Chocolatey?

For a long time, Chocolatey was the most-used package manager on Windows. It still has a larger repository and advanced features that matter in corporate environments. But winget needs no additional installation on Windows 11, has official Microsoft support and integrates with the Microsoft Store. For personal use and development setups, winget covers the essentials with no external dependencies — and the learning curve is shorter.

For sysadmins who want to go further — hardening workstations before deployment, for example — winget pairs well with the Windows 11 security settings we've covered here: installing a clean system with winget and applying the security policies in the same sequence is a routine that wraps up in under 30 minutes.

Conclusion

winget isn't new — the first public version shipped in 2020 — but it's still underused outside development environments. For anyone administering multiple Windows machines, the winget export + winget import pair alone justifies learning the tool. And a scheduled winget upgrade --all is the kind of simple automation that removes an entire category of repetitive tasks without demanding an elaborate script.

If you want to go deeper on the scripting side — chaining winget with other automations or building installed-version reports — the natural starting point is PowerShell 7.6 LTS, which brought meaningful improvements for infrastructure automation scripts.

Comments