
Step 1: Open PowerShell
- Click on the Start Menu and search for PowerShell.
- Right-click on Windows PowerShell and select Run as administrator.
Note: Running PowerShell as an administrator is recommended to avoid permission issues.
Step 2: Check Chocolatey Installation
Method 1: Using the choco -v
Command
Type the following command in PowerShell and press Enter:
choco -v
- If Chocolatey is installed, you will see an output displaying the installed version, like this:
1.2.3 (Example version)
- If Chocolatey is not installed, you will see an error message saying that
choco
is not recognized.
Method 2: Checking the Installation Directory
Another way to check if Chocolatey is installed is by verifying its installation folder. Run this command:
Test-Path "$env:ProgramData\chocolatey"
- If the output is
True
, Chocolatey is installed. - If the output is
False
, Chocolatey is not installed.
Step 3: What to Do If Chocolatey Is Not Installed?
If you find that Chocolatey is not installed, you can install it by following these steps:
- Open PowerShell as Administrator.
- Run the following command to install Chocolatey:
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'))
- Once the installation completes, restart your PowerShell and verify Chocolatey installation using:
choco -v