Modules
WinGet provides three PowerShell modules:Microsoft.WinGet.Client
The client module provides cmdlets for package management operations:Install-WinGetPackage- Install packagesUninstall-WinGetPackage- Uninstall packagesUpdate-WinGetPackage- Update packagesFind-WinGetPackage- Search for packages in sourcesGet-WinGetPackage- List installed packages
Microsoft.WinGet.Configuration
The configuration module provides cmdlets for managing configuration files:Get-WinGetConfiguration- Open a configuration setInvoke-WinGetConfiguration- Apply a configuration setGet-WinGetConfigurationDetails- Get details for configuration units
Microsoft.WinGet.DSC
The DSC module provides Desired State Configuration resources for WinGet:WinGetPackage- Manage package installation stateWinGetSource- Manage package sourcesWinGetUserSettings- Manage user settingsWinGetAdminSettings- Manage admin settingsWinGetPackageManager- Ensure WinGet is installed
Installation
Install the PowerShell modules from the PowerShell Gallery: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: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