Zum Inhalt
program installation chocolatey Intune
Home » chocolatey - Programm Installation - Intune

chocolatey - Programm Installation - Intune

Im letzten Beitrag (chocolatey - Grundinstallation | scloud) habe ich darüber geschrieben, wie wir Chocolatey installieren und somit die Basis für die Installation von Applikationen via Chocolatey sicherstellen. Für die Verteilung der Applikationen via Chocolatey erstelle ich ebenfalls je ein Win32 Paket, dass ich dann mit Intune verteile. So kann nachverfolgt werden, welche Applikation wo sowie wann installiert wurde. Zudem kannst du diese so auch einzeln deinstallieren.

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

Dieser Beitrag ist der zweite Teil einer Serie zur Verwaltung von Chocolatey Applikationen via Intune.

Part 1: chocolatey - Grundinstallation mit Intune | scloud
Part 2: Dieser Beitrag
Part 3: chocolatey - Programme up to date halten - Intune | scloud

Table of Contents

Chocolatey Win32

Das Packet, welches du in ein Win32- beziehungsweise Intunewin-File umwandeln kannst besteht aus folgenden Dateien:

FileBeschreibung
install.ps1Installations-File, welches aus der Datei "choco.txt" das zu installierende Paket ausliest und zudem, falls vorhanden die Installations-Parameter aus "parameter.txt" anfügt. Zusätzlich wir ein Log lokal unter "C:\Program Files\4net\EndpointManager" geschrieben.
choco.txtProgramm Name gemäss: Chocolatey Software | Packages
parameter.txtFalls nötig oder gewünscht Parameter gemäss Chocolatey Package Dokumentation.
Die meisten Programme brauchen übrigens keine Parameter. In diesem Fall kannst du den Inhalt auch einfach löschen.
check.ps1Erkennungs-Regel für Programm
uninstall.ps1Deinstalliert das Programm und entfernet es aus dem lokalen Chocolatey Katalog.

Wird nun ein neues Programm benötigt, muss du dies in der "choco.txt" sowie der "check.ps1" Datei eingetragen werden (Optional auch im parameter.txt).

Sobald das intunewin-Packet erstellt wurde (Prepare a Win32 app to be uploaded to Microsoft Intune | Microsoft Docs), kann dieses hochgeladen und verteilt werden.
Hier auch noch eine allgemeine Anleitung für das paketieren von mir: Create Win32 App / .intunewin | scloud

Die Parameter dazu sind:

SettingsWert
Win32 Fileinstall.intunewin
Nameje nach Applikation
HerausgeberBetreuer der Umgebung, z.B. 4net AG
LogoNicht zwingend, aber schön, wenn das Unternehmens Portal genutzt wird.
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

So einfach hast du dann ein Programm mit Intune (Win32) und Chocolatey installiert. Um zudem die Updates der Programme gewährleistet zu können, habe ich dir folgenden Beitrag vorbereitet:

Troubleshoot Chocolatey Installation

Um die Installation zu troubleshooten erstellt jede Installation sowie Deinstallation ein Log. Diese werden jeweils im Pfad "C:\Program Files\4net\EndpointManager\Log" abgelegt.
Das Log beinhaltet das komplette Transkript der installation. Hierzu ein Beispiel der Snagit installation mit der Installations-Meldung von Chocolatey:

Chocolatey installation log

11 Gedanken zu „chocolatey - Programm Installation - Intune“

  1. Pingback: chocolatey - Programme up to date halten | scloud

  2. Thank you for the great article!

    I have been trying for a while but the check part is not working correctly. Could you please help?

    The application was not detected after installation completed successfully (0x87D1041C)

    I have looked up the error but all the staff is not relevant, talking about the app being deleted or updated.

    I have tried the script on the VM I have pushed it to and it works.

    1. Thanks for your feedback 🙂
      Sounds like a problem with the detection rule (check.ps1). Did you add the chocolatey id to the fists line in the "check.ps1"?
      There you should change "snagit" with the program you also declared in the "choco.txt"
      $ProgramName = "snagit" <-- chocolatey id

  3. Hi Florian,

    Thank you for your reply. I have put the name correctly, and it is not working as well, even if the installation does not work. Could you tell me something about the parameters license? Do I need to pay for that or obtain my own?

    I am a more visual learner, and could you please look at the video I have recorded the way I am putting this together?

    https://www.loom.com/share/cb6dc3fad8b1459c9b9c50ce199d4887

    Thank you!

    Best regards,
    Sharif

    1. Thanks for the helpful video.

      You can remove the content from the "parameter.txt".
      Those parameters are an example for Snagit. Most programs via chocolatey don't require parameters.

      To troubleshoot the zoom installation, you'll find a log at "C:\Program Files\4net\EndpointManager\Log\zoom-install.log"

  4. Pingback: chocolatey - Grundinstallation mit Intune | scloud

  5. Hi Florian,

    Many thnx for a perfect solution. There is one thing i can't seem to get working. I'am trying to install PDF Xchange with Chocolatey, which is working. But i need to use some parameters, and can't get it to work.

    Could you provide me with an example? I want to use the /NoDesktopShortcuts and /NoUpdater.

    Kind regards,

    Danny

  6. We just upload the .intunewin to Intune, how can the uninstall.ps1 and choco.txt be read as they're not uploaded to Intune?

Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

de_CHDE