Windows Server 2025

Winget Configure to Manage Windows Server 2025 apps and PowerShell Desired State

Take a look at winget configure as a tool for managing and configuring your Windows Server 2025 instances and PowerShell Desired State configuration DSC.

Quick Summary

  • I think it is a great move by Microsoft to give admins and developers what they need to manage and configure Windows Server from the command line and give us an out-of-the-box package manager like we have had in Linux for years.
  • Table of contentsWinget is included by default in Windows Server 2025Winget commands to configure your Windows ServerViewing parametersViewing your version of Winget you have installedRunning the winget upgrade –all commandConfiguring your winget settingsInstalling software like Visual Studio CodeWinget configure for PowerShell Desired State configurationWrapping up.
  • With the release of Windows Server 2025, Microsoft has included winget by default, and you can easily use it to manage and install apps on your Windows Server environment.

There is no question that winget will completely change how we manage and configure Windows Server apps and components. It will also help developers and IT professionals with desired state configurations. With the release of Windows Server 2025, Microsoft has included winget by default, and you can easily use it to manage and install apps on your Windows Server environment. Let’s look at winget commands and winget configure to use for Windows Server management and PowerShell desired state configuration.

Winget is included by default in Windows Server 2025

Winget is automatically included with Windows Server 2025. So, you don’t have to jump through hoops to install it in earlier Windows Server versions.

I think it is a great move by Microsoft to give admins and developers what they need to manage and configure Windows Server from the command line and give us an out-of-the-box package manager like we have had in Linux for years.

Winget commands to configure your Windows Server

You can use many commands with winget to configure your Windows Server.

Viewing parameters

To see the commands that are included and parameters you can use, just enter the following command into a Windows Terminal prompt:

winget

Viewing your version of Winget you have installed

Viewing the version of winget you have installed
Viewing the version of winget you have installed

Discovering software that needs to be updated

One of the first basic commands you will use with winget is the following command to upgrade all software:

winget upgrade

You will need to accept the agreement.

Running the winget upgrade command
Running the winget upgrade command

You should then see the packages that can be upgraded using winget.

Viewing software that can be updated with winget
Viewing software that can be updated with winget

Running the winget upgrade –all command

Now that we know what packages can be updated, we can run the command:

winget upgrade --all

This will begin the process of upgrading all packages that have upgrades available.

Running the winget upgrade all command
Running the winget upgrade all command

Configuring your winget settings

You can also configure your winget settings using the configuration file to customize the look and feel of your winget application, including things like the look of the progress bar, etc. To open your winget settings file you just type the following:

winget settings

Installing software like Visual Studio Code

To demonstrate just how easy it is to install tools and utilities you might need, you can install VSCode using the following command line command:

winget install vscode
Installing vscode application using winget
Installing vscode application using winget

Winget configure for PowerShell Desired State configuration

With Winget’s integration into Windows Server, you now have support for infrastructure as code (IaC) through PowerShell’s Desired State Configuration (DSC). This will allow for automating and codifying server setups to make configurations consistent across environments.

In this case, Winget is used as the orchestrator for DSC. It enhances DSC by allowing for configurations to be applied on demand. This is a great feature that beneficial for development scenarios and IT professionals using automation.

A sample configuration file from the Microsoft DevHome repository:

# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2

##########################################################################################################
# This configuration will install the tools necessary to get started with Python development on Windows  #
# Reference: https://learn.microsoft.com/en-us/windows/python/beginners                                  #
#                                                                                                        #
# This will:                                                                                             #
#     * Enable Developer Mode                                                                            #
#     * Install GitHub Desktop                                                                           #
#     * Install Python                                                                                   #
#     * Install Visual Studio Code                                                                       #
#                                                                                                        #
##########################################################################################################

properties:
  resources:
    - resource: Microsoft.Windows.Developer/DeveloperMode
      id: Enable
      directives:
        description: Enable Developer Mode
        allowPrerelease: true
      settings:
        Ensure: Present
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      id: Python 3.12
      directives:
        description: Install Python 3.12
        allowPrerelease: true
      settings:
        id: Python.Python.3.12
        source: winget
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      id: GitHub Desktop
      directives:
        description: Install GitHub Desktop
        allowPrerelease: true
      settings:
        id: GitHub.GitHubDesktop
        source: winget
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      id: VisualStudio Code
      directives:
        description: Install Visual Studio Code
        allowPrerelease: true
      settings:
        id: Microsoft.VisualStudioCode
        source: winget
  configurationVersion: 0.2.0

You can run the configuration of the YAML file by the command:

winget configure

You can also simply pass in a configuration file URL such as the URL for the sample YAML configuration above:

winget configure https://raw.githubusercontent.com/microsoft/devhome/main/docs/sampleConfigurations/Templates/Introduction/Python3.12/configuration.dsc.yaml
Running the winget configure command
Running the winget configure command

You will need to confirm the configuration operation to continue.

Confirm the configuration of winget configure
Confirm the configuration of winget configure

After a couple of minutes, the winget configure command completes successfully. We can see the packages that have been installed on the Windows Server 2025 instance.

The winget configure command completes successfully
The winget configure command completes successfully

Wrapping up

The winget configure and other winget commands are great new tools that can be used natively in Windows Server 2025. These commands will help take configuration of future generations of Windows server to the next level and provide developers and IT professionals easy built-in tools for configuration. The commands we have listed above provide the basics of working with Winget on Windows Server. Let me know in the comments if you are looking forward to using winget in your configuration management workflows on Windows Server 2025.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.