In this tutorial, we will discuss how to quickly setup Chocolatey package manager on the latest version of Windows.
Chocolatey is a package manager for Windows. It is designed to simplify the process of managing software on the Windows operating system in a way that's consistent and understandable.
With Chocolatey, you can:
- Install software: You can use a single command to install software, similar to apt-get or yum on Linux.
- Upgrade software: You can use Chocolatey to manage updates to software already installed on your system.
- Uninstall software: With Chocolatey, you can uninstall programs just as easily as you installed them.
- Configure software installations: You can create scripts that will automatically install a suite of software on a new machine, perfect for automating the setup of a development workstation.
- Create packages: You can also create your own packages, to distribute software in your organization or to the wider community.
- Windows 7+ / Windows Server 2003+
- PowerShell v2+
- .NET Framework 4+ (the installation will attempt to install .NET 4.0 if you do not have it installed).
Check PowerShell Execution Policy
The first step is to ensure that the PowerShell Execution policy is not restricted. You can check this by running the PowerShell as administrator and run the command:
If the command above returns
Restricted use the command below to change it.
Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
This should set the Execution Policy to AllSigned which allows you to install Signed packages.
Once complete, run the command below to install Chocolatey on your machine.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
The command above should download the Chocolatey PowerShell installer on your machine and allow PowerShell to install the package manager on your machine.
Once compelete, you can verify Chocolatey has been installed successfully using the command:
if installed successfully, the command should return the installed version as:
Chocolatey v1.4.0 Please run 'choco -?' or 'choco <command> -?' for help menu.
In this post, we explored how you can quickly install the Chocolatey package manager on Windows 11 using Windows PowerShell.