Manage WinGet Configuration Files

November 13, 2025 · View on GitHub

The Manage a Configuration File feature in WinGet Studio enables you to create and modify WinGet Configuration files. You can also use it to view, validate, test, and apply WinGet Configuration files in the graphical user interface (GUI). This tutorial walks you through using the tool to work with WinGet 0.2.0 Configuration files and Microsoft Desired State Configuration (DSC) files.

Prerequisites

Before you begin, ensure you have:

  • WinGet Studio installed from the GitHub releases page
  • Windows Package Manager (WinGet) installed
  • PowerShell 7 or later for working with Microsoft DSC 3.x resources
  • Administrator privileges for certain resource operations
  • Familiarity with DSC and PowerShell DSC 2.0 - Complete the resource validation guide first if you're new to these concepts. The validation guide also installs the required DSC resources and tools needed to complete this guide.

What you'll learn

In this tutorial, you learn how to:

  • Navigate to the Manage a configuration file page
  • Create a new WinGet Configuration file
    • Add a resource to a configuration
    • Specify dependencies for sequencing in a configuration
    • Specify that a resource requires elevation
  • View an existing WinGet Configuration file
  • Validate, test, and apply a WinGet Configuration file

Launching the Manage Configuration experience

When you launch WinGet Studio, the Home screen displays two main options:

WinGet Studio home screen with Manage Configuration and Validate Resource buttons

Select Manage Configuration to open the configuration management page.

The Manage a Configuration file page with New configuration and Open configuration buttons

The Configuration Management page provides tools to work with WinGet Configuration files. Once you create or open a file, you can edit, validate, test, apply, or save it.

In this step-by-step example, you author a new WinGet configuration file to ensure a package is installed, and modify a setting for that package requiring elevation. The WinGet package "Microsoft.AppInstaller" from the community repository is used (it should already be installed on your system).

New Configuration

Start a new configuration by selecting New configuration.

New Configuration

WinGet Studio generates a new WinGet Configuration File using DSC. It adds a new "Module/Resource" to the left side of the editor and shows the modifiable fields on the right side.

New Configuration Template

Note

This first resource instance added to the configuration file is a placeholder. It correctly validates in WinGet Studio, but it would fail if you attempted to run it in its current state.

If you're already familiar with the Validate a resource experience in WinGet Studio, this interface might look familiar. However, there are extra fields related to how this instance of a resource is included in the configuration file.

Expand the "Module/Resource" by selecting the arrow to the right of the Edit button next to the "Module/Resource" on the left side of the editor. This action opens a visual view of the resource instance in the configuration file.

Expand Resource view on left side

Modifying a Resource Instance

In the Resource type field, enter winget. WinGet Studio performs a search to find matching resources. This should look familiar to the "Validate a resource" experience. Available resources appear on the left side of the dropdown menu, and their types and DSC versions appear on the right side.

Select the Microsoft.WinGet/Package resource from the dropdown menu.

Entering WinGet in the Resource type field on the right side

The Resource name field is used to uniquely identify an instance of a resource being used in a WinGet Configuration file. This value is used to map dependencies to guarantee sequencing in your configuration. Short descriptive values for name are often the best.

Since WinGet is installed via the Microsoft.AppInstaller package, update the Resource name to Install WinGet. The Description field is an optional field where you can provide a more verbose explanation of what this resource instance does. Update the Description to Ensure WinGet is installed.

Resource name "install WinGet" description "Ensure WinGet is installed"

Select the ℹ️ button to the right of Microsoft.WinGet/Package.

Information button to the right of the resource

The resource properties are displayed.

Microsoft.WinGet/Package Resource properties

Select Copy as YAML.

Copy as YAML highlighted in the resource properties display

Paste the results in the editor below the description field as shown. This method of copying the properties includes default values for each setting.

YAML pasted into properties under Description field

In this example, you only need two properties. Modify the properties so that only the id and source are displayed as shown:

id: Microsoft.AppInstaller
source: winget

Microsoft.AppInstaller package specified from the WinGet source

Now, select the Update button on the lower right corner of WinGet Studio.

Update the resource instance in the configuration file

Notice the visual resource display on the left has been updated and a notification appears on the top right stating "Configuration unit updated".

Visual display on the left has been updated

Validate a WinGet Configuration File

The next step is to validate the configuration. When you select the Validate button for the configuration file, WinGet Studio checks for syntax correctness.

Validate the configuration button highlighted

If the configuration file is valid, WinGet Studio notifies you that the "Configuration code is valid".

Configuration code is valid

Test a WinGet Configuration File

Next, select the Test button next to the Validate button.

Test button next to Validate Button

This action executes the "Test" method on the entire configuration file. No changes are made to your system when you run "Test". If your system is in the desired state (which it should be for this example), WinGet Studio informs you "Machine is in the desired state".

Machine is in the desired state

Given your machine is already in the desired state as shown in the previous step, DSC doesn't perform any action to change anything on your system when you apply the configuration. DSC always performs "Test" before "Set".

Apply a WinGet Configuration File

For completeness, select the Apply button next to the Test button.

Apply is highlighted next to Test

A warning appears any time you run a configuration file. If you agree, select the Apply button below the warning.

WinGet Configuration Terms / Warning

WinGet Studio displays progress while the configuration is running.

Applying the Configuration

Once the configuration completes, the results are visible.

Configuration applied

Select Done to return to the Manage a configuration file experience.

View the Configuration file as YAML

Select the Code button to toggle between the graphical resource view and the code view to see the raw YAML configuration file.

Code Button

Notice the graphical representation of the configuration on the left side of the editor now displays the raw YAML configuration file.

Code Button

Select the Code button again to return to the visual representation.

Now is a good time to save the configuration file. Since this configuration file was built using the New configuration button, the Save button has been disabled. Use the Save As button to save the file. Consider using "tutorial.WinGet" as the file name, and choosing your desktop is convenient if you don't have another preferred location to save the file.

Save As Button

WinGet Studio informs you once the file has been saved.

Configuration saved successfully

Add a Resource Instance to a Configuration

The configuration you've been building up to this point only contains a single resource instance. Next, you add another resource to this configuration. The new resource has a dependency on the existing resource in the configuration, and it requires elevation (administrator privilege) to run.

Select the Add resource button.

Add Resource Button

Follow the same process as before. In the Resource type, search for winget. Select the Microsoft.WinGet/AdminSettings resource. Use Configure WinGet for the Resource name. Use Ensure WinGet Local Manifests are Enabled for the Description. Use the following YAML in the editor below the Description:

settings:
  LocalManifestFiles: true

Important

YAML is whitespace sensitive. For the Microsoft.WinGet/AdminSettings properties, you need two spaces on the second line before "LocalManifestFiles".

Once you've entered everything, select the Update button. WinGet Studio should look like the following image.

WinGet Admin Settings Configured in WinGet Studio

Now, select Elevated from the Security Context dropdown.

Selecting Elevated from the Security Context

Select the Update button to update the resource settings. Notice the shield icon in the visual view for the resource on the left side of the editor.

Elevated Resource with a Shield

The next step is to specify the dependency for this resource instance. It wouldn't make sense to configure the WinGet Administrator Settings if WinGet wasn't installed on your system.

Note

Another common scenario for resource dependencies is adding an extension or a workload to an IDE. You would need to ensure the IDE was installed on the machine before attempting to configure it.

Select the Dependencies button, and check the box next to Install WinGet.

Set Install WinGet as a dependency

Select the Update button to save your changes. Then expand the visual view of the resource on the left side of the editor. The location of the expander is indicated by the red arrow in the following image. You see the Dependencies now includes Install WinGet.

Dependencies include Install WinGet