Chocolatey is a package manager that makes administering software and dependencies easy on Windows. You can quickly and easily deploy software packages and tools to a new Windows machine in just a few steps. Chocolatey's simple and familiar syntax is easy to learn and can save heaps of time when setting up a new environment.
Install Chocolatey with either CMD or PowerShell. After installation, you may need to log out and back in to set your new environment.
Open an administrative command prompt (right-click
Command Prompt (administrator)) and type the following command:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Open an administrative PowerShell prompt (right-click
Windows PowerShell (administrator)) and type the following 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'))
There are hundreds of packages that you can browse on the Chocolatey website https://chocolatey.org/packages or by running:
Some common server and development packages available through Chocolatey include:
To install a package, open an administrative command prompt or PowerShell session and type the following command:
choco install <packagename> -y
Chocolatey will also install any dependencies automatically. You can also include multiple packages in one command to minimize waiting:
choco install visualstudiocode fiddler googlechrome -y
Packages are removed similarly to how they are installed. Run the following command to uninstall your chosen package:
choco uninstall <packagename>
You can even uninstall Chocolatey itself with this command:
choco uninstall chocolatey
For additional command-line options, run Chocolatey with the
/? command line switch: