Quantcast
Channel: Windows Server Archives - TechDirectArchive
Viewing all articles
Browse latest Browse all 42

How to Install Winget on Windows Server

$
0
0
How to Install Winget on Windows Server
How to Install Winget on Windows Server

Winget, also known as the Windows Package Manager, is a powerful tool that simplifies the installation, updating, and management of software packages on Windows systems. This guide will walk you through the process of getting Winget up and running on a Windows Server, specifically focusing on versions like Windows Server 2022 and 2019. Please see Install and Manage Applications with Winget, How to keep Apps up to date on Windows devices, how to install Windows Package Manager (Winget CLI), and Windows App Package: How to Bundle MSIX packages.

Although Windows 10 and 11 officially support Winget, installing it on a Windows Server environment can be more complex due to dependency issues.

What is Winget?

Winget is an open-source package manager developed by Microsoft, designed specifically for Windows 10 and 11. It allows users to install, update, uninstall, and configure applications from the command line, making software management on Windows as seamless as it is on Linux.

Core Features of Winget:

Below are some Winget Core features.

  • Open-Source: The code for Winget is available on GitHub, providing transparency and encouraging community contributions.
  • Command-Line Interface: No more navigating through the Microsoft Store or third-party websites. With Winget, you can manage software directly from PowerShell or the command prompt.
  • Automation-Friendly: You can easily script Winget, making it ideal for system administrators and DevOps teams to automate software management tasks.
  • Supports Multiple Package Types: Winget handles not only EXE files but also MSI and MSIX packages.

Prerequisites

Before you start, ensure that you meet the following prerequisites:

  • Windows Server Version: Make sure you’re not using Windows Server Core, as Winget isn’t supported there.
  • Dependencies: You’ll need to install Microsoft.UI.Xaml.2.7.x and Microsoft.VCLibs.x64.
  • Administrator Access: Ensure you have admin rights on the server.

You may be interested in these articles: How to install, upgrade and uninstall Chocolatey, how to install, upgrade and uninstall software with Chocolatey, and how to install applications with Winget CLI on Windows.

Step 1: Install Microsoft UI XAML & VCLibs

Since Winget isn’t natively included with Windows Server, you’ll need to manually install its dependencies, starting with Microsoft UI XAML and Microsoft VCLibs.

Installing Microsoft.UI.Xaml

Visit the NuGet webpage for Microsoft UI XAML 2.7 and download the package.

Download Microsoft UI xaml package
Download Microsoft UI xaml package

After downloading, rename the file extension from .nupkg to .zip.

Rename the file to zip file
Rename the file to zip file

Extract the contents of the zip file.

Extract file
Extract file

Open PowerShell as administrator and navigate to the folder path where you extracted the files using the cmdlet below.

cd C:\Users\downloads\microsoft.ui.xaml.2.7.3

Run the following command to install the package:

Add-AppxPackage -Path .\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx
Install Microsoft UI Xaml package
Install Microsoft UI Xaml package

Install Visual C++ Runtime Library (VCLibs 14)

Visit the Microsoft website and download the appropriate version of Microsoft.VCLibs.x64, based on your system architecture.

Open PowerShell in the directory where the VCLibs file is saved, and run the following command to install the package:

Add-AppxPackage -Path .\Microsoft.VCLibs.x64.appx
Install Microsoft VCLibs package
Install Microsoft VCLibs package

Step 2: Install Microsoft Desktop App Installer and Winget

With the dependencies installed, you can now proceed to install the Winget tool itself.

Go to the GitHub releases page for Winget and download the Microsoft.DesktopAppInstaller.msixbundle file along with its corresponding license file.

Download windows package manager bundle and license file
Download windows package manager bundle and license file

Open PowerShell in the directory where you saved the Winget package, and run the following command to install Winget:

Add-AppxPackage .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

Run the following command to apply the license file:

Add-AppxProvisionedPackage -Online -Package .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\24146eb205d040e69ef2d92d7034d97f_License1.xml
Install windows package manager bundle and license file
Install windows package manager bundle and license file

Step 3: Verify the Installation

After completing the installation, it’s important to verify that Winget is properly installed and functioning.

Open a new PowerShell window as an administrator. Type winget and press Enter.

Winget command
Winget command

If installed correctly, you should see a list of Winget commands.

Conclusion

While Winget isn’t included with Windows Server out of the box, this guide shows that installing it manually is a relatively straightforward process. Once set up, Winget provides a powerful, Linux-like package management experience on Windows Server, making software installation, updates, and management more efficient and less time-consuming. This tool is an excellent addition to any Windows Server environment, particularly for those who value automation and streamlined workflows.

I hope you found this article useful on “How to Install Winget on Windows Server.” Please feel free to leave a comment below.

The post How to Install Winget on Windows Server appeared first on TechDirectArchive.


Viewing all articles
Browse latest Browse all 42

Trending Articles