Skip to main content
The Windows Package Manager PowerShell module provides cmdlets for managing packages on Windows systems. The module includes commands for installing, updating, uninstalling, and searching for packages from configured sources.

Modules

WinGet provides three PowerShell modules:

Microsoft.WinGet.Client

The client module provides cmdlets for package management operations:
  • Install-WinGetPackage - Install packages
  • Uninstall-WinGetPackage - Uninstall packages
  • Update-WinGetPackage - Update packages
  • Find-WinGetPackage - Search for packages in sources
  • Get-WinGetPackage - List installed packages

Microsoft.WinGet.Configuration

The configuration module provides cmdlets for managing configuration files:
  • Get-WinGetConfiguration - Open a configuration set
  • Invoke-WinGetConfiguration - Apply a configuration set
  • Get-WinGetConfigurationDetails - Get details for configuration units

Microsoft.WinGet.DSC

The DSC module provides Desired State Configuration resources for WinGet:
  • WinGetPackage - Manage package installation state
  • WinGetSource - Manage package sources
  • WinGetUserSettings - Manage user settings
  • WinGetAdminSettings - Manage admin settings
  • WinGetPackageManager - Ensure WinGet is installed

Installation

Install the PowerShell modules from the PowerShell Gallery:
Install-Module -Name Microsoft.WinGet.Client
Install-Module -Name Microsoft.WinGet.Configuration
Install-Module -Name Microsoft.WinGet.DSC

Requirements

  • Windows 10 version 1809 or later, or Windows 11
  • PowerShell 7.2 or later (Windows PowerShell is not supported)
  • Windows Package Manager (WinGet) installed

Getting Started

Import the module and start using cmdlets:
Import-Module Microsoft.WinGet.Client

# Search for a package
Find-WinGetPackage -Name "PowerToys"

# Install a package
Install-WinGetPackage -Id Microsoft.PowerToys

# List installed packages
Get-WinGetPackage

Common Parameters

Most cmdlets support common PowerShell parameters:
  • -Verbose - Display detailed information
  • -WhatIf - Show what would happen without executing
  • -Confirm - Prompt for confirmation before executing
  • -ErrorAction - Control error handling behavior

Next Steps

Getting Started

Learn how to install and use the PowerShell modules

Client Cmdlets

Explore package management cmdlets

Configuration

Manage configuration files with PowerShell

DSC Resources

Use DSC resources for declarative configuration

Build docs developers (and LLMs) love