Opens a configuration set from a file or history.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/microsoft/winget-cli/llms.txt
Use this file to discover all available pages before exploring further.
Syntax
From File (Default)
From History
All from History
Description
TheGet-WinGetConfiguration cmdlet opens and loads a configuration set from a file or from configuration history. The configuration set can then be passed to Invoke-WinGetConfiguration to apply it to the system, or to Get-WinGetConfigurationDetails to retrieve detailed information.
Parameters
The path to the configuration file (YAML format) to load.Pipeline Input: true (by property name)
Parameter Set: OpenConfigurationSetFromFile
Position: 0
Required: true
Parameter Set: OpenConfigurationSetFromFile
Position: 0
Required: true
The instance identifier (GUID) of a configuration set from history.Pipeline Input: true (by property name)
Parameter Set: OpenConfigurationSetFromHistory
Position: 0
Required: true
Parameter Set: OpenConfigurationSetFromHistory
Position: 0
Required: true
Retrieve all configuration sets from history.Parameter Set: OpenAllConfigurationSetsFromHistory
Required: true
Required: true
Custom location to install PowerShell modules required by the configuration.Pipeline Input: true (by property name)
Position: 1
Position: 1
Custom path to the DSCv3 processor executable.Pipeline Input: true (by property name)
Outputs
A configuration set that can be applied or inspected.
Examples
Example 1: Load Configuration from File
Example 2: Load and Apply
Example 3: Load from History
Example 4: Get All Configurations from History
Example 5: Load with Custom Module Path
Example 6: Load with Custom Processor
Example 7: Load and Inspect
Example 8: Load Relative Path
Example 9: Error Handling
Example 10: Load and Get Details
Notes
- Alias:
gwgc - Configuration files must be in YAML format
- The cmdlet validates the configuration schema
- Use
-ModulePathto control where PowerShell modules are installed - Use
-ProcessorPathto specify a custom DSC processor - History feature stores previously applied configurations