Chocolatey – Package management for Windows

I already blogged about the package management module of the Powershell and how great and awesome it is (Powershell package management – NuGet, Chocolatey and Co). It just can happen, that the installation of some modules from chocolatey do not work as expected. I had this e.g. for Firefox or Chrome. In such cases, it’s better to directly use chocolatey (choco.exe).

Fastest way to install and run it is to open Powershell as administrator and execute the following script:

Set-ExecutionPolicy Unrestricted 
iwr -UseBasicParsing | iex

This installs chocolatey and adds it to the path. After that, you should be able to run chocolatey:

choco install firefox
choco install notepadplusplus -x86  # 64 bit version does not have all plugins

It’s a good and simple way to install basic tools like firefox – e.g. at windows servers where IE/Edge is (by default) not able to open websites without adding a security exception.

Basic tools for servers

I use the following script to install some basic tools on servers (because it’s much faster than adding security exception for IE/Edge, downloading the stuff etc.):
Be aware, that some packages are not maintained by the creators – e.g. the firefox package is not maintained directly by the Mozilla Foundation.

Set-ExecutionPolicy Unrestricted iwr -UseBasicParsing | iex 
choco install firefox -y 
#choco install googlechrome -y 
choco install notepadplusplus -x86 -y

Basic tools for my environments

I use the following script to setup my environment:

Set-ExecutionPolicy Unrestricted
iwr -UseBasicParsing | iex
# Basic Utils
choco install 7zip -y
choco install adobereader -y
choco install brave -y
choco install bulkrenameutility -y
choco install drawio -y
#choco install dropbox -y
choco install expressvpn -y
choco install firefox -x86 -y
choco install googlechrome -y
choco install gpg4win -y
choco install imageresizerapp -y
choco install keepass.install -y
choco install keybase -y
#choco install miktex -y
choco install notepadplusplus -x86 -y
#choco install opera -y
choco install -y
choco install powerbi -y
choco install powershell-core -y
#choco install signal -y
choco install skype -y
choco install spotify -y
#choco install todoist -y
choco install toggl -y
choco install wireguard -y
choco install xmind -y
#choco install teamviewer -y
#choco install virtualbox -y
#choco install vlc -y
#choco install wireshark -y
# Developer Tools
#choco install atom -y
choco install azurestorageexplorer -y
choco install azure-data-studio -y
choco install docker-desktop -y
choco install fiddler -y
choco install filezilla -y
choco install git -y
choco install nodejs.install -y
choco install nuget.commandline -y
choco install postman -y
choco install python -y
choco install ServiceBusExplorer -y
choco install sql-server-management-studio -y
choco install sqlitebrowser.install -y
choco install vscode -y
# Optional
# choco install foobar2000 -y
# choco install mysql.workbench -y
# choco install tortoisesvn -y
# Pin packages that are automatically updated
$pin = "azure-data-studio", "brave", "drawio", "dropbox", "expressvpn", "firefox", "googlechrome", "microsoft-teams", "opera", "", "signal", "skype", "spotify", "atom", "vscode"
$pin | foreach { choco pin add -n $_ }
view raw chocoinstall.ps1 hosted with ❤ by GitHub

Upgrading packages

It’s also very simple to update all packages or just a specific one. The commands are:

choco upgrade visualstudiocode 
# or 
choco upgrade all
# or
choco upgrade all -y

If you want to see all your packages with available updates – use:

choco outdated

some packages are updated automatically – e.g. firefox. therefore it makes sense to remove them from the update list. you can do this via:

choco pin add -n=atom 
choco pin add -n=Firefox 
choco pin add -n=GoogleChrome 
choco pin add -n=keepass 
choco pin add -n="keepass.install" 
choco pin add -n=signal 
choco pin add -n=visualstudiocode

to list all your local packages, use:

choco list -li

Additional information


One response

Leave a Reply

Your email address will not be published. Required fields are marked *