Creating a .intunewin file and choosing the source file, source folder and the output folder is time consuming. Let´s also not forget the time we waste on searching for the newest version of a application we want to deploy. Following all this time consuming, manual steps I have created a tool that will automate all this steps with the help of Microsoft WinGet.
Here is a video that shows how it works:
This is a Overview of all steps in the PowerShell Script:
Features of the Tool
- Download the current IntuneWinAppUtil.exe.
- Download and install WinGet.
- Download the current version of Applications directly from the source.
- Extract the direct download link for any of the 3600+ applications from the WinGet Repository.
- Convert downloaded executables to a, ready to deploy, .intunewin file.
- Logging in a separate .txt file.
- Automate all of the processes above, with just providing the App ID from WinGet.
This is a early version (0.1). Expect new features and bug fixes in the near time.
Goal of this post
Get a understanding of how WinGet works and also how we can use it for our needs to automate the creation of a .intunewin file.
Tools and Services used
- PowerShell (& WPF)
What is WinGet?
WinGet basically a tool from Microsoft that enables users to search for, install and also upgrade apps on their devices. It´s the client interface to the Windows Package Manager service. Don´t worry if you think that you will have to install it separately: Windows Package Manager WinGet command-line tool is bundled with Windows 11 and modern versions of Windows 10 by default as the App Installer. This is not always the case after testing it with various devices and OS Versions but the winget2intunewin-Tool will also check if it installed on your device and if not will try to install it. Check the docs from Microsoft to get a better understanding how it works and also look into the GitHub Repository:
How to use it
It´s very easy to use this tool. Basically by providing a Application Name (1. Step: Search Application) the tool will search for the Application in WinGet and simultaneously create a App Folder under C:\winget2intunewin\$AppName. This is also the Output folder for the .intunewin file later on. Secondly the whole download process will start depending on the Application ID you paste from the first step (Check out the Video if you need) and after pressing the red button. Finally you will be presented with a .intunewin file which you then can upload to Intune and assign it to devices or users.
- This tool relies on WinGet to find and also download applications, so even though winget2intunewin will try to install WinGet for you if it is not present, it could fail if this tool doesn´t run with administrative privileges which brings me to the second prerequisite:
- If possible, run this tool (.ps1) with administrative privileges. This will minimize errors e. g. installing WinGet or creating a .intunewin file with IntuneWinAppUtil from Microsoft. But again, test it on your own device and see for yourself whats fit you best.
Search Application in WinGet
Type in the Application you want and click on Search.
A new PowerShell Window will open up. Now you need to pick the ID (e.g. SlackTechnologies.Slack) of the Application you want to install. Copy the ID. We will need it in the next Step.
Info: Depending on what you type in the Application field, a new Folder named after the Application will be created in C:\winget2intunewin.
Copy and Paste the Application ID
Enter the ID from the first step into the second field and click on Save ID:
Be sure to check out the Logs on the right to verify that the ID was saved successfully:
Download the Application and create the IntuneWin file
After saving the Application ID, click on the last button to start the download and to create the IntuneWin file:
The download will start in a new PowerShell Window. The file will be saved in the Application Folder (e. g. C:\winget2intunewin\Slack).
After the download, the IntuneWinAppUtil will convert the file automatically to a .intunewin file which you then can go and upload to Intune.
Upload the App to Intune
endpoint.microsoft.com -> Apps -> Windows
Click on +Add and choose Windows app (Win32) in the App type drop-down box.
Click on Select.
On the next page click on Select app package file and pick the .intunewin file in the output folder from the tool (e. g. C:\winget2intunewin\Slack)
Click on OK, fill out the Publisher field and click on Next.
Proceed by filling out every other field and assign the app to a Azure AD Group.