Click here to Skip to main content
15,867,686 members
Articles / Programming Languages / PowerShell
Technical Blog

Chocolatey - Package Management for Windows

Rate me:
Please Sign up or sign in to vote.
4.67/5 (2 votes)
22 Mar 2020CPOL2 min read 5K   6   2
A quick look at what is Chocolatey and how to install it
In this post, you will take a look at what is Chocolatey and how to install it on your computer. You will also see my Chocolatey script that I used to get my main Windows development environment up and running.

Between 6 months to a year, I start to feel that my Windows installation is running sluggish. Is there some malware running somewhere? Is Windows just getting slow? Either way, I like a fresh installation.

Chocolatey to the rescue of clicking next a thousand times.

What is Chocolatey?

Chocolatey is a package management solution for Windows, similar to npm, apt-get, etc. It means that you don’t have to sit there searching/downloading/running and click next next next, for every individual piece of software you want to install on your computer.

My Disaster Recovery Strategy

Chocolatey is also part of my DR strategy, if my laptop goes bang. It is going to take a day or two for Dell to come out and fix my laptop, so wherever I am, I can drive to a local computer shop, by any decentish laptop and get up and running in the time it takes for chocolatey to run. Most of my important files are synced to OneDrive / NextCloud. So once those have synced, I’m back up and running.

Installing Chocolatey

You will need PowerShell installed, and open up an elevated instance of PowerShell (Run-as administrator).

Copy and paste the following into your PowerShell prompt, and after about 30 seconds, you will have chocolatey available on your system.

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'))

You will need to shutdown and restart Powershell to be able to first use chocolatey.

My Chocolatey Script

The following script is what I used to get my main Windows development environment up and running.

It is possible to run chocolatey with multiple applications on one line, i.e., choco install app1 app2 app3 but this doesn’t make much of a difference, as all the applications are downloaded and installed in sequence anyway. It would be good for the downloads all to happen as the installations continue. So I’ve separated all the commands out just for readability.

# Install git
choco install git -y

# Install Visual Studio Code
choco install vscode -y

# Instal Visual Studio 2019 Professional
choco install visualstudio2019professional -y

# Install PowerShell Core
choco install powershell-core -y

# Install Azure CLI
choco install azure-cli -y

# Install Azure PowerShell 6.9.0
choco install azurepowershell -y

# Install JetBrains dotPeek
choco install dotpeek -y

# Install Google Chrome
choco install googlechrome -y

# Install firefox
choco install firefox -y

# Install Joplin
choco install joplin -y

# Install VLC
choco install vlc -y

# Install Office 365
choco install office365business -y

# Install Microsoft Teams
choco install microsoft-teams -y

# Install mRemoteNG
choco install mremoteng -y

# Install NextCloud
choco install nextcloud-client -y

# Install Windows Terminal
choco install microsoft-windows-terminal -y

# Install Remote Desktop Connection Manager
choco install rdcman -y

# Install 7-Zip
choco install 7zip -y

# Install Tomighty
choco install tomighty -y

# Install Calibre
Calibre -y

# Install WinDirStat
choco install windirstat -y

# Install Logitech Options (for my mouse/keyboard)
choco install logitech-options -y

# Instal SQL Server Management Studio
choco install sql-server-management-studio -y

# Install paint.net
choco install paint.net -y

# Install qbittorrent
choco install qbittorrent -y

# Install League of Legends
choco install leagueoflegends -y

Conclusion

Chocolatey is a pretty good solution for me, it doesn’t have ALL the software that I need. But it probably has 95% of what I use.

I wish there was a central way to keep configuration and logins. But at least this gets me up and running pretty quickly for a while.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United Kingdom United Kingdom
I have been working in software development for over 16 years, during that time I have worn many hats.

I have worked as a Software Engineer, Architect, Agile Coach and Trainer. I’ve created teams, I’ve lead teams, but my main goal is to help teams build great software and enjoy the process.

I help a whole range of businesses – from startups with just an idea who want to build a team to take that idea into reality and FTSE 100 businesses who need to optimise existing teams – I train, mentor and coach them to success.

If you happen to know of anybody who could benefit from results like this, then please go to my contact page and get in touch.

Owen Davies

Comments and Discussions

 
QuestionChocolatey across a LAN? Pin
dandy7223-Mar-20 6:34
dandy7223-Mar-20 6:34 
QuestionSome additional information, automatic updating and GUI Pin
wim4you23-Mar-20 1:08
wim4you23-Mar-20 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.