microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.05k stars 1.43k forks source link

Distribute in an enterprise #4268

Open craftzneko opened 6 months ago

craftzneko commented 6 months ago

Brief description of your issue

I simply want to ensure that all machines in our domain have winget, the latest version. They all run windows 10 and have builds released within the last 6 months. But our users dont use the MS store. They do however use intune and any apps we approve and setup through there. I just want to know, but cant seem to find will they have winget installed. If not how can i distribute this through intune. I see a load of scripts online which seem ridiculously complicated for deploying a tool like this. Has there been any thought in this project to how it links to intune.

Lets say all our machines have it installed, how is it updated? Via windows updates, or does someone have to manually run soemthing. Basically i want to know from enterprise point of view how to manage and deploy this tool.

denelon commented 6 months ago

Intune doesn't have a "hard" dependency on the WinGet Client distributed via App Installer (updated automatically via Microsoft Store). The IME (Intune Management Extension) is using its own instance of a library (provided by the WinGet team).

If users are allowed to run WinGet on the client device, that's where a dependency on the client (included in App Installer) would come into play.

PckgrTom commented 6 months ago

Hello,

I have achieved this using a Winget Pre-Install win32 application. I then add this as a dependency to my Intune Winget applications so it makes sure that Winget is installed before trying to deploy these applications. It's particularly useful for Windows Autopilot scenarios.

craftzneko commented 6 months ago

thanks @denelon and @PckgrTom. In my case I'm using winget as part of a deployed script to export for inventory of software packages on machines. So if I want winget client on all my clients that can be used outside of IME I would need to deploy app installer?

PckgrBot commented 6 months ago

thanks @denelon and @PckgrTom. In my case I'm using winget as part of a deployed script to export for inventory of software packages on machines. So if I want winget client on all my clients that can be used outside of IME I would need to deploy app installer?

Are you deploying the script in SYSTEM conext? You could add some logic at the beginning of the script to check if Winget is installed, if not then install the dependencies/Winget.

MerouCosmique commented 6 months ago

Brief description of your issue

I simply want to ensure that all machines in our domain have winget, the latest version. They all run windows 10 and have builds released within the last 6 months. But our users dont use the MS store. They do however use intune and any apps we approve and setup through there. I just want to know, but cant seem to find will they have winget installed. If not how can i distribute this through intune. I see a load of scripts online which seem ridiculously complicated for deploying a tool like this. Has there been any thought in this project to how it links to intune.

Lets say all our machines have it installed, how is it updated? Via windows updates, or does someone have to manually run soemthing. Basically i want to know from enterprise point of view how to manage and deploy this tool.

Hi, In the case you using Intune to manage your computers and deploy applications, you can deploy the latest version of Winget by pushing the msixbundle of Winget and its dependencies with the "Line-of-Business app" method. 2024-03-15 14_31_48-Select app type - Microsoft Intune admin center — Mozilla Firefox 2024-03-15 14_32_10-App package file - Microsoft Intune admin center — Mozilla Firefox

We use it to push Winget in our computer park (in the way to install apps with dedicated scripts after), it work well for us.

Hope i helped you :)

craftzneko commented 6 months ago

Thanks @MerouCosmique that does help and might be what we end up doing! Cheers

@PckgrBot Its actually run from a script that's deployed via remedations (running as system). I have some logic to skip if its not available but i would like it to be on all 8000 of our devices so i suspect using MerouCosmique's method will be the way I go.