Wednesday 16 August 2023

Deploy Chocolatey packages with Microsoft Intune

 Deploying Chocolatey packages using Intune

Let me start by saying this is currently working with Chocolatey version 2.2.2 in August of 2023.


To deploy chocolatey packages using Intune three scripts are required. Install.ps1, uninstall.ps1, and detection.ps1. 

These three scripts along with a pre-compiled .intunewin file are available at this url:


To setup the package follow these steps:

1. Add a new Windows App (Win32)
2. Upload the .intunewin file
3. Change the Name, Description, and add the Publisher. I like to do information on this page, but that is optional. 



4. On the Program tab, enter this for the Install Command:

powershell.exe -ExecutionPolicy Bypass -file ./install.ps1 {packagename} 

 Then enter this for the Uninstall Command:

powershell.exe -ExecutionPolicy Bypass -file ./uninstall.ps1 {packagename}

Your page should look like this:


5. For the Requirements page, I usually just choose 64 Bit and an old build of windows. 

6. For the Detection Rules, you need to modify the detection.ps1 script with the name of the package and then upload it here under the "Use a custom detection script" option.



7. For dependencies ideally you would have Chocolatey as a package and add it here, but that is optional. 

8. Under assignments choose who will get this package and then you are done!

Enjoy having one click self updating deployments using Intune and Chocolatey!


No comments:

Post a Comment

Deploy Chocolatey packages with Microsoft Intune

 Deploying Chocolatey packages using Intune Let me start by saying this is currently working with Chocolatey version 2.2.2 in August of 2023...