Automating Windows Software Management : A Deep Dive into the PowerShell WINGET Module

The WINGET PowerShell module (Microsoft.WinGet.Client) brings the capabilities of the official Windows Package Manager to PowerShell, allowing administrators and power users to automate and manage software installations, updates, and removals on Windows 10, Windows 11, and Windows Server. This module exposes most WINGET CLI features as PowerShell cmdlets, making it easier to integrate with automation workflows and scripts.

Installing WINGET Module

To install the WINGET PowerShell module, use :

Install-Module -Name Microsoft.WinGet.Client -Force
# Import Installed Module
Import-Module -Name Microsoft.WinGet.Client

Note: The WINGET CLI must be installed and available on your system for the module to function properly.

Key Cmdlets

The WINGET module provides several useful cmdlets:

  • Find-WinGetPackage : Searches for packages in the WINGET repository.
  • Install-WinGetPackage : Installs a specified application.
  • Uninstall-WinGetPackage : Removes an installed package.
  • Update-WinGetPackage : Updates an existing package.
  • Get-WinGetPackage : Lists installed packages.
  • Export-WinGetPackage : Exports installed package list.
  • Get-WinGetVersion : Returns the version of the WINGET client.
  • Other cmdlets help manage configuration, repair installations, and handle sources.

List all the packages/Apps installed on your system

This command line will list all the packages installed on your system from WinGet sources and other methods. Packages installed using MSIX or ARP can’t be correlated to WinGet.

Get-WinGetPackage

Find a Package/App in Microsoft Store or Winget Galery

You can use this command to search for specific packages from the configured resources. In this example, we will search for Notepad++

Find-WinGetPackage -Name Notepad++

To search for Apps from Microsoft store only, you can add Source value :

Find-WinGetPackage -Name Notepad -Source msstore

If you want to search for VLC media player :

Find-WinGetPackage -Name VLC

Install an Application

In this example we will install VLC Media Player in Silent mode, for this we need to specify package id, we will use package id we got in the previous example here :

To install package in silent mode we need to specify mode in “Silent”

Install-WinGetPackage -Id VideoLAN.VLC -Mode Silent

Parameters are :

  • -Architecture : You can specify the processor architecture for the WinGet package installer. The values are Arm, Arm64, Default, X64, or X86.
  • -Force : Force the installer to run even when other checks WinGet would perform would prevent this action.
  • -Mode : Specify the installer’s output mode. Values are silent or interactive.
  • -Scope : Specify the WinGet package installer scope. Values are Any, User, System, UserOrUnknown, SystemOrUnkown.
  • -Source Use this to specify the source location.
  • -Version Specify the version of the WinGet package to be downloaded.

Update Apps/Packages

In this example we will update 7zip App, we can always get Id from installed Packages using Get-WinGetPackage command line :

Update-WinGetPackage -id 7zip.7zip

This command helps keep all installed applications up to date with the latest versions.

Repair installed Package/App

This will repair a WinGet package installation on your computer if the package supports that, in this example we will repair Microsoft Teams :

Repair-WinGetPackage -Id Microsoft.Teams

Parameters are :

  • -AllUsers : Use this parameter to repair the WinGet client for all user accounts on the computer. The command must be run with administrator permissions.
  • -IncludePreRelease : Use this parameter to include prerelease versions of the WinGet client.
  • -Latest : Use this parameter to install the latest version of the WinGet client.
  • -Version : Use this parameter to specify the specific version of the WinGet client to install.

Advanced Automation

WINGET also supports configuration via YAML files and can be managed declaratively for complex setups:

  • Configure multiple applications and system states.
  • Automate onboarding of new machines and rapid redeployment.

Advantages

  • Returns PowerShell objects for easy manipulation.
  • Supports PowerShell pipelines for advanced automation.
  • Simplifies bulk software deployment and updates across devices.
  • Integrates seamlessly into existing administrative scripts and reporting.

Conclusion

The WINGET PowerShell module bridges traditional and modern Windows software management, giving administrators and advanced users a robust automation tool. Its combination of package management and PowerShell scripting streamlines installations, updates, and configuration tasks for both individual systems and entire enterprise environments

For more informations :

Use WinGet to install and manage applications | Microsoft Learn

Master Managing WinGet with PowerShell | ScriptRunner Blog

PowerShell is fun :)Using the PowerShell WinGet module

list Command | Microsoft Learn

Thanks

Aymen EL JAZIRI (Microsoft MVP)
Aymen EL JAZIRI (Microsoft MVP)

Hi, I’m Aymen El Jaziri , a passionate System Administrator and Microsoft MVP, with years of hands-on experience in managing and securing modern IT infrastructures.
This blog is where I share technical guides, automation scripts, product reviews, and real-world solutions that help IT professionals simplify their day-to-day work and stay ahead in a fast-evolving cloud ecosystem.
Whether you’re here to troubleshoot an issue, improve your automation game, or learn new best practices , welcome in my blog !
Let’s build a stronger, smarter IT community together.
Feel free to connect with me on LinkedIn for more content, discussions, or collaboration opportunities.

Thanks

Aymen

Articles: 156