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 https://chocolatey.org/install.ps1 -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 https://chocolatey.org/install.ps1 -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:
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:
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