(131) Microsoft Intune - Win32 App: Chocolatey Package Manager
- Mr B SOE way
- Jun 21, 2024
- 1 min read
Updated: Jun 26, 2024
Had a last minute request from a customer wanting to package chocolatey, as all know Chocolatey is package manager similar to Winget which has been covered here https://soeintunedevice.wixsite.com/home/post/37-new-microsoft-store-integrated-in-intune
Note: Both the install.ps1 and detect.ps1 can be found in my github repo.
Instructions:
1. Create the following, we need to package it up as a Win32 app.
For install.ps1:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
For detect.ps1: if (test-path "C:\ProgramData\chocolatey"){"Installed"}
2. Create the Win32 package with https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool
3. Program Command lines: Install:
%windir%\sysnative\windowspowershell\v1.0\powershell.exe -executionPolicy bypass -windowstyle hidden -file ./Install.ps1 Uninstall: uninstallcmdline
4. Detection rules:
Rules format: Use a custom detection script
Run script as 32-bit process on 64-bit clients: No Enforce script signature check and run script silently: No
End result once install, by running the detect.ps1 you will see this
Comments