In the last post (chocolatey - basic installation | scloud) I wrote about how we install Chocolatey and thus ensure the basis for installing applications via Chocolatey. For the distribution of the applications via Chocolatey, I also create a Win32 package that I then distribute with Intune. In this way, it can be tracked which application was installed where and when. You can also uninstall them individually.

Für sämtliche Pakete kann hierzu dieselbe Basis verwendet werden. Die Vorlage ist hier zu finden:

This post is the second part of a series on managing Chocolatey applications via Intune.

Part 1: chocolatey - basic installation with Intune | scloud
Part 2: This Post.
Part 3: chocolatey - keeping programs up to date - Intune | scloud

Table of Contents

Chocolatey Win32

The package, which you can convert into a Win32 or Intunewin file, consists of the following files:

FileDescription
install.ps1Installation file, which reads the package to be installed from the "choco.txt" file and, if available, also appends the installation parameters from "parameter.txt". In addition, a log is written locally under "C:\Program Files\MEM\EndpointManager".
choco.txtProgram name according to: Chocolatey Software | Packages
parameter.txtIf necessary or desired parameters according to the Chocolatey Package documentation.
By the way, most programs don't need any parameters. In this case, you can also simply delete the content.
check.ps1Recognition rule for program
uninstall.ps1Uninstalls the program and removes it from the local Chocolatey catalog.

If a new program is now required, you must enter this in the "choco.txt" and the "check.ps1" file (optionally also in parameter.txt).

Once the intunewin package has been created (Prepare a Win32 app to be uploaded to Microsoft Intune | Microsoft Docs), this can be uploaded and distributed.
Here is a general guide for packaging from me: Create Win32 App / .intunewin | scloud

The parameters for this are:

Settingsvalue
Win32 Fileinstall.intunewin
Namedepending on the application
editorMaintainer of the environment, eg scloud
logoNot mandatory, but nice when the company portal is used.
Install command%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -command .\install.ps1
Uninstall command%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -command .\uninstall.ps1
Requirements64 bit
Detection rulecustom script, check.ps1
Dependencieschocolatey

You installed a program with Intune (Win32) and Chocolatey that easily. In order to be able to guarantee the updates of the programs, I have prepared the following article for you:

Troubleshoot Chocolatey Installation

To troubleshoot the installation, each installation and uninstallation creates a log. These are each in the path "C:\Program Files\MEM\EndpointManager\Log" filed.
The log contains the complete transcript of the installation. Here is an example of the Snagit installation with the installation message from Chocolatey:

Chocolatey installation log