How to install Chocolatey in Windows?

How to install Chocolatey in Windows?

In this blog post, I will show you how to install Chocolatey, a package manager for Windows, in a few easy steps. Chocolatey allows you to install and update software from the command line, saving you time and hassle. Here are the steps to install Chocolatey on Windows:

  1. Open an administrative PowerShell window. You can do this by pressing Windows+X and selecting "Windows PowerShell (Admin)" from the menu.

  2. Check the execution policy by typing the command "Get-ExecutionPolicy" and hit enter. Chances are high it will be Restricted or Unrestricted.

  1. If it's not "AllSigned", then change the policy using command "Set-ExecutionPolicy AllSigned" and hit enter. Then it'll confirm you want to change the policy type "Y" and hit enter.

This image has an empty alt attribute; its file name is image-1.png

  1. Once policy is set, confirm it by command "Get-ExecutionPolicy" and hit enter.

This image has an empty alt attribute; its file name is image-2.png

  1. Run the following command to download and run the Chocolatey installation script:
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'))

6. Wait for the installation to complete. You should see a message like "Chocolatey is ready" at the end.

7. Close and reopen the PowerShell window to refresh the environment variables.

8. Test that Chocolatey is working by running the command: "choco -?". You should see the Chocolatey help information.

Congratulations, you have successfully installed Chocolatey in Windows! You can now use it to install and update software from the command line. For more information, visit chocolatey.org.

Official Chocolatey Homepage -> https://chocolatey.org

Official Chocolatey Install Page -> https://chocolatey.org/install

Official Chocolatey Docs Page -> https://docs.chocolatey.org/en-us