- First, in your Windows search bar type
PowerShelland 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.
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.
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.
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/packagesand 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)
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 google chrometurns up several options, with the topmost being the one I want (the latest version of the Google Chrome browser).
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!)
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.
Chocolatey is a PowerShell-based software management solution that allows you to manage every aspect of your Windows software environment.