How to install Chocolatey Using PowerShell on Windows
How to install Chocolatey in PowerShell on Windows
Chocolatey is a command line installer for Windows applications. Much like Lunux-based homebrew, yum or apt-get install, but for Windows CLI (command line interface).
In this tutorial we'll take a look at how to install Chocolatey on Windows 10 using PowerShell. But it's the same on Windows 7 and 11.
To Install Chocolatey Using PowerShell in Windows follow these steps:
Go to Start button and type powershell and hit Enter to open Power Shell.
You might need to click Run as Administrator instead of just Run.
To get started we need to run Get-ExecutionPolicy.
If it returns Restricted, you need to run one of the two commands below:
Set-ExecutionPolicy AllSigned
Or alternatively,
Set-ExecutionPolicy Bypass -Scope Process
(If it doesn't return restricted, you can simply skip those steps.)
To install Chocolatey in PowerShell copy and paste this PowerShell command:
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'))
Hit enter and Chocolatey will be installed on your system.
Example: You can now install Node LTS and JDK11 as follows:
choco install -y nodejs-lts openjdk11
At first it felt awkward to use Chocolatey but once I got used to it I never wanted to go back to going to "official" app websites to download and install apps via Windows GUI installers.