Chocolatey

Image

Chocolatey

Overview

Chocolatey has a few of flavors, a basic tool, with community curated packages that you can install with a simple command line, or a complex automation system for management of endpoints.

Check out the 3 tiers on their pricing page, this will give you an overview of what comes in their Open Source Version

Demo

Using a VM running Windows 10, going to install Chocolatey, then leverage it to install some applications.

Installation of Chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Choco 01

Installing apps with Chocolatey

I then went to this package page to find something I wanted to install, found a few good items for testing:
Choco 02

I then open up an elevated PowerShell prompt and run the command:
Choco 03

choco install gimp -y

Using with Configuration Manager (LAB ONLY)

So I like to have several applications available in my lab for testing with OSD. I don’t want to take time to update applications, I just always want them to be current. Several years ago I wrote a script that leverages Ninite to always install the latest version of specific software. (You can find it on GARYTOWN by searching Ninite)
I wanted to replicate that with Chocolatey for fun.

CAUTION

This is not a good practice and should ONLY be used in a lab for testing. To make this work, without getting super fancy, I’ve had to use generic detection methods.

The Application in CM, Name: FileZilla Chocolatey, AppDT Name: FileZilla Chocolatey.
Choco 05
Content: None
Installation Command:

cmd.exe /c PowerShell -Command "& {Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))}" & cmd.exe /c PowerShell -Command "& {choco install filezilla -y}"

Detection: %programFiles%FileZilla FTP Clientfilezilla.exe

In Software Center:
Choco 06

Running from Software Center:
Choco 07

The application doesn’t need to download anything before it starts, it runs the commands then installs the application via downloading the content needed from the internet.

Things to Watch For

If you manually uninstall an application you installed with Chocolatey, then try to reinstall with Chocolatey, it doesn’t like that. If you install it with Chocolatey, uninstall with Chocolately,

You can use basically the same Uninstall command as Install, and you’ll be set:

cmd.exe /c PowerShell -Command "& {Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))}" & cmd.exe /c PowerShell -Command "& {choco uninstall filezilla -y}"

Choco 08

Test Drive

YouTube Video, Click on Image:
Choco 09

Community Related Posts

Summary

This is a great tool for your lab if you’re looking for a free way to install applications during OSD without maintaining them. If you’re looking to do more with it, like packaging your software, you can sure do that too, but that was more than I wanted to tackle here, plus the website has really good documentation. I spent about a hour going over the few "quick start guides" to get a better grasp of Chocolatey and what it can do, which was a lot more than I previously thought, and much more than I talked about on this page. If you’re interested in application packaging automation, and other workstation management capabilities for your organization, check out their site.

About Recast Software
1 in 3 organizations using Microsoft Configuration Manager rely on Right Click Tools to surface vulnerabilities and remediate quicker than ever before.
Download Free Tools
Request Pricing

See how Right Click Tools are changing the way systems are managed.

Immediately boost productivity with our limited, free to use, Community Edition.

Get started with Right Click Tools today:

Share this:

Support

  • This field is for validation purposes and should be left unchanged.

Contact

  • This field is for validation purposes and should be left unchanged.

Contact

  • This field is for validation purposes and should be left unchanged.
en_USEnglish