This time it is about a so-called “freemium” software management solution. Feemium is made up of the two words “Free” and “Premium” and means that the software can be used free of charge, but certain functions cost extra. With mobile apps, this also means banner ads and annoying video commercials, but that is not the case here. This article is exclusively about the free version.
Again, the aim is to give small and medium-sized organisations something to help them run their IT better for little money.
The basics of Chocolatey
Chocolatey is based on Microsoft PowerShell 2.0 (3.0 or higher recommended), the PowerShell extension NuGet and the .Net Framework 4.0 (.Net 4.5 recommended). It serves as a framework to bundle and easily extend different installation technologies. It does not matter whether the software is available as an MSI package, EXE installer, source code package or PowerShell script. Chocolatey is similar in use to Linux software / package managers such as apt-get or yum. This means that the client downloads the software from a repository that is maintained. Both internal company repositories and public repositories are supported.
For example, there is also a software repository that is maintained by the community. Of course, you have to trust the community that the software does not contain “extras” such as viruses, Trojans or backdoors. However, all packages are checked by various virus scanners when they are published. Most packages also go and download the software directly from the manufacturer’s site for licensing reasons (redistribution rights). Here, for example, is part of the installation script for Adobe Acrobat:
However, this may lead to increased data volumes if you distribute a 300MB download package on 100 systems and do not have a corresponding proxy server. Also, the installation through the download takes longer than if the installation were done from a local server. One way to do this would be to create your own repositories with customised packages, assuming you have the necessary permissions.
Here are a few examples of software packages provided by the community:
- Adobe Acrobat Reader DC
- Google Chrome
- Mozilla Firefox
- Individual Microsoft Serviceing Updates
- Microsoft Visual C++ Runtimes
- Microsoft .Net 4.8
- Visual Studio
- Microsoft Office 365 Business
Also, the community repositories are not intended for intensive use. Chocolatey recommends either a proxy repository or a commercial licence. Also, IP addresses may be blocked if the use is too intensive. Also, a proxy repository does not help with the problem of downloads from the manufacturer’s sites, but only with the Chocolatey package, which is mostly just a download and installation wrapper.
The installation is very simple, in a PowerShell with administrative rights the following command is executed:
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'))
Installing and Managing Software
Installing software is easy. In PowerShell, enter the command “choco install” followed by the package name. For example, “choco install adobereader”:
As you can see well in this example, dependencies are also directly resolved with and prerequisites are installed. Chocolatey also gives appropriate feedback if a restart is necessary.
If you want a specific version of a package, you can specify this with the parameter “–version=” followed by the version.
Checking the installed packages
The locally installed packages can be checked with the command “choco list –local-only”.
Updating Chocolatey packages
Updating individual packages is relatively simple, just use the command “choco upgrade adobereader”.
Since you don’t always have an overview of all software, you could also simply update all installed packages. This is easily done with the command “choco upgrade all -y”, and no more questions will be asked.
If you want to be comfortable, you can set up a scheduled task for this.
If you have nothing else, Chocolatey can be a good solution for smaller companies and institutions. You have to be aware that you are handing over control of the packages to the community (if it’s allowed to cost nothing) and that a residual risk remains. In certain scenarios, however, I consider community repositories to be impractical, for example with larger client numbers, low bandwidths or when it comes to pre-provisioning.
Note to this article
This article was automatically translated from German from our German partner blog InfrastrukturHelden.de.