winget-cli: Winget command missing from server 2019

Winget command missing from server 2019

Environment

[winget --info]
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.server 17763.1
Package: Microsoft.DesktopAppInstaller v1.0.41331.0


Any other software?

Steps to reproduce

  1. Install the latest Windows Package Manager
  2. I cannot find the Windows Package Manager though I have it installed.

Expected behavior

Winget should be available from the command line.

Actual behavior

Winget is not available from the command line. The only way to get it to work,

  1. enable developer mode in settings
  2. execute the following powershell command Get-AppxPackage Microsoft.DesktopAppInstaller | %{ Invoke-CommandInDesktopPackage -PackageFamilyName $_.PackageFamilyName -AppId winget -Command C:\Windows\System32\cmd.exe -PreventBreakaway }
  3. navigate to the app package and run AppInstallerCli.exe

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 15 (7 by maintainers)

Most upvoted comments

I think winget for windows server core is very needed and critical

Hi @denelon I fully agree with your challenges and concern.

As you can mostly only speak for your product, I would propose to make a check for this policy (it is in registry policies) and if set throw an error message when trying to download.

In my professional role I always try to convince enterprises to block the app access to private MS Store via GPO but not blocking the communication as preinstalled apps would not update, neither modern drivers would work correctly as DCH driver have thankfully separated their tools into the store. I am curious how this will work with Windows 11 when the business store is gone.

In addition to this it would also compromise the ability to use the business store (as long it will remain) for enterprise deployments.

Doubt that enterprises that fully block the store would use Winget.

These enterprises from SMB to SMC mostly use

  1. DNS blocks in perimeter firewalling
  2. Redirections via AD DNS, some even setup their AD DNS to never ask root servers means they really care to assign their DNS requests in the AD DNS manually
  3. They use lmhost of Windows to prevent the resolution
  4. They use one or more GPOs, as outlined.

I hope this helps you to consider the options I see regularly in the wild.

How to create winget alias - https://github.com/al-cheb/winget_install_script/blob/main/Install-WinGet.ps1

PS > Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version

Caption                                  Version
-------                                  -------
Microsoft Windows Server 2019 Datacenter 10.0.17763


PS > C:\Windows\System32\winget.exe --info
Windows Package Manager v1.0.11451
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Server v10.0.17763.1935
Package: Microsoft.DesktopAppInstaller v1.11.11451.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
--------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget

PS > C:\Windows\System32\winget.exe show
Multiple packages found matching input criteria. Please refine the input.
Name                           Id                                Source
-----------------------------------------------------------------------
Robo3T                         3T.Robo3T                         winget
Robo3T - Beta                  3T.Robo3TBeta                     winget
ndm                            720kb.ndm                         winget
Aya                            7room.Aya                         winget
7-Zip                          7zip.7zip                         winget
7-Zip - Alpha                  7zip.7zipAlpha                    winget
8x8 Work                       8x8.VirtualOfficeDesktop          winget```