Easily Install PC Programs Using PowerShell and Chocolatey

Chocolatey makes PC app management a breeze...
Odin Odin (62)
0

Chocolatey is a simple and powerful PowerShell-based software management solution that allows you to manage every aspect of your Windows software environment, including updates over time! You just type a simple PowerShell command for whatever program you want to install and manage, run it, and boom — instant success.

Not only can Chocolatey manage software installation, but it can also manage updates as well, all through simple PowerShell.

For those who have a complicated software environment for our PC, being able to skip the literally hours of tedious work going through step-by-step installations manually is vital.

Today, we’re going to concentrate on one of its best-loved features: common software installation using PowerShell.

PowerShell vs Command Prompt

PowerShell is our weapon of choice for this installation because of its user-friendly “cmdlets” which are easy to understand because of their verb-noun convention for explaining what a command is and what it does. Chocolatey can also be installed using Command Prompt using a slightly different method.

Don’t worry. Even if you’re very new to using the more advanced features of Windows, this guide will walk you through the process.

A note regarding advanced Chocolatey features

Chocolatey is an extremely powerful tool with a large range of features and options that can become quite addicting to use when compared to manual methods of handling your PC's software. We will soon have several guides available for managing your software using Chocolatey, including advanced GUI (graphical user interface features), advanced PowerShell commands for controlling software installed via Chocolatey, and using your own custom .bat file to install Chocolatey automatically on your system (along with all the software you could ever desire).

Posted in these interests:
Chocolatey Logo
h/chocolatey3 guides
h/windows40 guides
PowerShell Logo
h/powershell5 guides
PowerShell
  • First, in your Windows search bar type PowerShell and select Run as Administrator from the list on the right.
  • Now copy and paste this text: 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'))
  • This will tell your system to download Chocolatey from the web and install it. If you’re concerned about security you can read Chocolatey’s page about security here.
  • Once that’s done, Chocolatey is installed! Now you could go ahead by writing your own scripts to install software, but Chocolatey also maintains a rigorously screened community repository of “packages”, which are pre-designed sets of code that will install the program you desire via Chocolatey.

Let’s go to the next step to learn how that works.

Update ch

If you need to upgrade Chocolatey at some point, which is likely, the process is extremely easy… because it’s handled by Chocolatey itself!

Simply open PowerShell as an Administrator and then copy and paste the following code:

choco upgrade chocolatey

Wait a few moments and you’re good to go! PowerShell should tell you that the process has been completed successfully with 1/1 packages updated.

communityrepository

Unless you decide to use the graphical user interface, you’ll install programs using a simple command in PowerShell, just like you did when you installed Chocolatey. Unlike with that big chunk of code we used in the last step, the commands needed to install all your favorite programs are generally straightforward.

Downloading programs via Chocolatey is kept easy due to the vast collection of community packages available through the Chocolatey website. These are all checked rigorously and must adhere to strict community guidelines, so most users won’t need to be concerned about their device’s security. Chocolatey has several help articles detailing their security practices for those interested and helpful guides for those who might want to build their own packages.

How many packages are available?

There are over 6,000 good packages available from the Chocolatey community, and these will cover just about any common program. There are a few that don’t exist (I, for instance, use DaVinci Resolve for my video editing and Scrivener for my writing, neither of which had a package as of April 2021). However, the number of available packages is huge, and it’s not that difficult to create your own packages — something we will cover in another guide.

Repository Search

PowerShell is such a handy tool for Windows users that we have to start there, though Chocolatey does have a graphical user interface available which we’ll discuss in the next step. If you’ve made it this far, congratulations, you’ve already been using PowerShell to get Chocolatey installed!

Now it’s time to get to the really fun part: installing all the software.

  • Navigate to https://community.chocolatey.org/packages and agree to the Chocolatey community policy.
  • Use the search bar to search for the name of whatever common application you wish to install. For instance: Firefox. The chances are high that the package you desire will be at the top, but you can browse the list to make sure.
  • In the code box of the package you want, there is a Chocolatey command. Copy that. (Ex.: choco install firefox)
search

You can also install programs directly through the PowerShell interface if you know the name of the program you want, but the community package page on the Chocolatey site can help you check the proper name and the current package status for the software you want to install (and, for security purposes, we recommend this).

If you want to search for software from within PowerShell, you can use the following command to look for a piece of software: choco search.

  • Example: choco search google chrome turns up several options, with the topmost being the one I want (the latest version of the Google Chrome browser).
GUI Example

Chocolatey also has a slick GUI (graphical user interface) available if you find code a little intimidating. To install the GUI, you’ll need to enter the following into PowerShell (make sure you’re in Admin mode!)

Chocolatey GUI example
  • choco install ChocolateyGUI
  • Then, press “a” and hit the Enter key. This will tell Chocolatey to install everything it needs in one shot.
  • Once the GUI is installed, you may close PowerShell and use your Windows search bar to look up “Chocolatey,” which should now appear as its own program. Once installed, you can handle all the basic aspects of Chocolatey easily from one place and without ever needing to touch the PowerShell again if you prefer.
Automatically install all your favorite programs with just one click.
Odin Odin (62)
0

Chocolatey is a PowerShell-based software management solution that allows you to manage every aspect of your Windows software environment.