Automate Bulk Software Installs & Updates with WinGet + PowerShell 🛠️

Automate Bulk Software Installs & Updates with WinGet + PowerShell :hammer_and_wrench:


Hey everyone! :waving_hand: Tired of manually downloading and updating all your daily‑use apps? Here’s a little‑known Windows trick that lets you install and auto‑update dozens of apps in one go using Microsoft’s built‑in package manager (WinGet) and a short PowerShell script. No more hunting down installers—save time and keep your system lean.


:pushpin: Why This Matters

  • Time‑Saver: 1 command to install or update 30+ apps
  • Consistent Environment: Great for fresh Windows installs or new machines
  • Zero Third‑Party Tools: Uses Microsoft’s official WinGet, so no sketchy downloads

:triangular_flag: Prerequisites

  1. Windows 10 21H1+ or Windows 11 (WinGet comes pre‑installed)
  2. PowerShell 7+ (optional but recommended)
  3. Administrator Privileges on your PC

:hammer_and_wrench: Step‑by‑Step Guide

  1. Verify WinGet Is Installed

    winget --version
    
    • If you see a version (e.g. 1.6.10271), you’re all set.
    • If not, install “App Installer” from the Microsoft Store.
  2. Create Your Package List

    • Open Notepad and paste your favorite apps’ IDs:

      microsoft.visualstudiocode
      google.chrome
      vlc.videolan.VLC
      spotify.Spotify
      7zip.7zip
      
    • Save as packages.txt in C:\Scripts\.

  3. Write the PowerShell Script

    • In the same folder, create Install‑Apps.ps1 with:

      # Path to your list
      $pkgList = "C:\Scripts\packages.txt"
      
      # Read all app IDs
      $apps = Get‑Content $pkgList
      
      # Loop through and install or upgrade
      foreach ($app in $apps) {
          Write‑Host "Processing $app…" -ForegroundColor Cyan
          winget install --id=$app --silent --accept-package-agreements --accept-source-agreements `
              -e -h --upgrade
      }
      
      Write‑Host "✅ All apps processed!" -ForegroundColor Green
      
    • Flags explained:

      • --silent: no UI
      • --accept-*: auto‑agree to prompts
      • -e: exact match (avoids wrong packages)
      • --upgrade: installs newer if already present
  4. Run the Script

    • Open PowerShell as Admin, navigate to C:\Scripts, then:

      Set-ExecutionPolicy Bypass -Scope Process
      .\Install-Apps.ps1
      
    • Watch WinGet fly through installs & updates!

  5. Automate with Task Scheduler

    • Open Task Scheduler → Create Task.

    • General: Run with highest privileges.

    • Triggers: New → Weekly (choose a day/time).

    • Actions: New → Program/script:

      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
      

      Add arguments:

      -ExecutionPolicy Bypass -File "C:\Scripts\Install-Apps.ps1"
      
    • Save. Now your apps auto‑refresh weekly!


:light_bulb: Pro Tips & Best Practices

  • Customize Your List: Add/remove IDs at any time; WinGet supports thousands of packages.
  • Error Logging: Append | Tee-Object C:\Scripts\winget-log.txt to capture output.
  • Test First: Run on a VM or spare PC to confirm no unwanted software installs.
  • Add Version Pinning: Use --version <x.y.z> if you need a specific release.

:rocket: Mini Case Study

On a fresh Windows 11 setup, I installed my entire “essentials” in under 3 minutes:
VS Code, Chrome, Firefox, 7-Zip, VLC, Git, Node.js, Python, Spotify, Zoom—zero manual clicks.
With Task Scheduler, I haven’t updated any of them by hand in 2 months!


— Happy Scripting!

Posted by: @JACK_DENIS

5 Likes