Cloudy: With a chance of Winget

Cloudy: With a chance of Winget

This blog will be about the experience I had with Winget. Until now we only made use of Chocolatey but I was intrigued if Winget could be a good replacement. After reading some other blogs and information I decided to test it out myself.

Just like always, I am going to divide this blog into 8 parts.

  1. Background information
  2. Installing the App installer
  3. Installing/removing applications
  4. Upgrading applications
  5. Winget ADMX
  6. Troubleshooting Winget
  7. Upload your own Apps
  8. Deploy all the apps with the company app

1.Background Information

Just like Chocolatey, Winget is a  tool to manage packages (Package Manager) on your device. This utility gives you the possibility to automate the whole process of installing/removing/upgrading (updating)  packages (software) on the device. Just with the use of the command line or PowerShell you could automatically download the packages and install them on the device. When you have some experience with Linux you will be familiar with it but Windows users didn’t have this built-in functionality so they needed to use some 3 party software like Chocolatey. Luckily in 2020 Microsoft released their own packaging manager for Windows 10. But when it was released it was a little bit buggy in my opinion. But things have changed a little bit, so I wanted to take a closer look at it.

2.Installing the app installer (winget)

When you want to play around or just want to start migrating your chocolatey apps to Winget, you will need to make sure Winget is installed on the devices.

You have got multiple options to install Winget

  1. Install the App Package with Powershell
  2. Deploy the App installer from the Microsoft Store

1.Using PowerShell

You could call upon the invoke web request to download the app package file straight from the source. When it’s downloaded you can use the add-appxpackage to install it

Md c:\temp\

Invoke-WebRequest -Uri “” -OutFile “C:\temp\WinGet.appxbundle”

Add-AppxPackage “C:\temp\WinGet.appxbundle”

2.Microsoft Store

If you don’t like to use a simple PowerShell script you could make sure The package manager is installed from within the Microsoft Store. But of course, you will need to make sure you have configured/synced the Microsoft store with your Microsoft 365 tenant.

When you have made sure the Microsoft store for business is connected you can click on the “Open the business store” to start searching

Search for Add the app installer package and install/order it.

When you have made sure the app is approved we can add the app to the company’s collection.

Don’t forget to sync and assign the app in Intune when you have added the app to the collection.

3.Installing and Removing applications

Installing Applications

Installing applications is done within a few seconds. If you want to get a list of all the applications you could install, just specify the “install” or “show” parameter and it will list all the packages out there.

Another possibility is just to open the browser and surf to

winget-pkgs/manifests at master · KaranKad/winget-pkgs (

Let’s proceed with installing some applications/packages. So if you want to install 7zip, you will need to specify this command

winget install (the ID).

But if you want to specify more apps at the same time, just use the ;

winget install 7zip.7zip  ;  winget install Mozilla.Firefox  – -force – – silent

Please Note:

Before installing applications, make sure you have taken a look at the settings in winget. Maybe you want to make sure the packages are installed for the entire machine instead of the current user?

This is my settings.json file which I tested Winget with

Removing Applications

Removing existing software is also very very easy. You will only need to specify the uninstall parameter and which apps need to be removed

It’s simple and it works just like it should and nothing more.

4.Upgrading applications

Just like with chocolatey you will get the possibility to update/upgrade apps. It’s very easy to upgrade the apps, you only need to specify the upgrade parameter and which app you want to update.

Or use the list option to check if a new version is available.

I guess I am going to like this winget update function a lot more in the feature than Chocolatey. Winget lists all applications which needed to be updated! Chocolatey only lists the applications which needed to be updated which chocolatey installed itself.

When you need to update all apps with Winget just specify the upgrade  – -all parameter.

If you want to make sure your apps are upgraded each week you could create a PowerShell script and convert it to a Win32app. This script will create an additional PowerShell script and attach it to a task schedule. Please Note: Sometimes stuff changes and I need to update my blog. I needed to add the –accept-source-agreements , otherwise, the upgrade was still waiting for approval!

$content = @'
winget upgrade --all --force --accept-source-agreements --accept-package-agreements --h

# create custom folder and write PS script
$path = $(Join-Path $env:ProgramData CustomScripts)
if (!(Test-Path $path))
New-Item -Path $path -ItemType Directory -Force -Confirm:$false
Out-File -FilePath $(Join-Path $env:ProgramData CustomScripts\WingetUppgradeApps.ps1) -Encoding unicode -Force -InputObject $content -Confirm:$false
# register script as scheduled task
$Time = New-ScheduledTaskTrigger -AtLogOn
$User = "SYSTEM"
$Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-ex bypass -file `"C:\ProgramData\CustomScripts\WingetUppgradeApps.ps1`""
Register-ScheduledTask -TaskName "UpgradeApps" -Trigger $Time -User $User -Action $Action -Force
Start-ScheduledTask -TaskName "UpgradeApps"

The only two things I am missing (for now) are:

1.Excluding applications.

When you have teams installed it will try to update teams…. And most of the time it will fail. Luckily when other programs needed to be updated it will just proceed even with the first installation error.

2.No applicable update found

And I guess that’s why I was mentioning: “I am going to like this update function” because for now a lot of already installed programs can not be upgraded! You will be prompted with: No applicable update found.

But when I remove the zoom 5.5.2 application first and reinstall the same version again with the parameter: Winget install zoom.zoom – -version 5.5.2

I can upgrade it with no problem at all? that’s odd but I know it can be very difficult to make sure all the packages can be updated.

5.Winget ADMX

I guess I really love this one. Winget even has its own ADMX files which you can use to limit some functions:

I guess when I am going to only use Winget, I will take some time to make sure you can ingest the ADMX in Intune.

6.Troubleshooting Winget installation errors

If you have the same luck like me, you always will directly end up with some troubleshooting. Don’t get me wrong, but I love when it fails on the first attempt… if al succeeds without errors, you don’t get the possibility to start troubleshooting it.

Luckily you will get a very nice log file, which I didn’t expected to be good…

Like I was telling you with the upgrade – option,  upgrading teams is difficult. It’s not winget that is causing the problem. it’s the teams installer.

I guess I have some experience with teams installers?

7.Building your own packages

If you want to start building your own packages you will need to install the create module first: “Winget install wingetcreate”

After the module is installed you can just create a new package when you enter this command: wingetcreate new. It will ask you for the download URL location of the installation file.

As an example, I specified the notepad + + exe download url

It will guide you to the whole process. It will ask you some default questions which need to be answered.

When you are almost done it will ask you to submit the package to your own repository and prompt you for your github credentials.

As shown above, I used the NotePad + + example, it’s already in the repository. Just within a minute, I (of course) received a message that it’s already in the repository.  So I closed the pull request.

8.Deploy the apps to your devices with the Company portal

Just like my blog about the Win32 PowerShell express and my blog about why you need to start loving the Company Portal App. You can create all the installation packages from scratch and upload them to Intune with PowerShell


When all the problems with winget are resolved you will need to start converting your Powershell/Chocolatey Win32 apps to Winget Applications.

I prefer to use a built-in utility over a third party tool but for now, I will stick to Chocolatey. I hope I can update this blog in the near future to tell you I am migrating all packages to Winget

5 thoughts on “Cloudy: With a chance of Winget

  1. How do you deploy the .json configuration file to endpoints using Intune? It is per-user (%LOCALAPPDATA%) so would need to be deployed to every active user’s profile on every endpoint?

    1. Thanx for telling.. but what is not working?
      The creation of the task or executing the task. Just tested it (not with intune) but with a normal powershell system powershell and the scheduler is created. I am using this method for lots of stuff
      So how can I help you?

      1. Thanks for the quick reply! So the script does in fact create the task but when run nothing actually happens. Nothing Updates when trying to check winget list afterwards. I have tried using system as well as the logged in user to run it as.

        1. I noticed the same.. I already updated the blog… Somehow you need to add this to the script –accept-source-agreements

Leave a Reply

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

3  +    =  13