Installing Chocolatey
Requirements
- 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)
That's it! All you need is choco.exe (that you get from the installation scripts) and you are good to go! No Visual Studio required.
Installing a Particular Version of Chocolatey
Set the following environment variable prior to install:
chocolateyVersion
- controls what version of Chocolatey is installed
In PowerShell, it looks like this:
$env:chocolateyVersion = '0.9.9.12'
# install script
This will only work with the installation methods that call https://community.chocolatey.org/install.ps1 as part of the install.
Use Windows Built-In Compression Instead of Downloading 7zip
Set the following environment variable prior to install:
chocolateyUseWindowsCompression
- this will bypass the download and use of 7zip.
In PowerShell, it looks like this:
$env:chocolateyUseWindowsCompression = 'true'
# install script
This will only work with the installation methods that call https://community.chocolatey.org/install.ps1 as part of the install.
Installing to a Different Location
- Create a machine level (user level will also work) environment variable named
ChocolateyInstall
and set it to the folder you want Chocolatey to install to prior to installation (this environment variable must be set globally or available to PowerShell- it is not enough to simply make it available to your current command prompt session). - Don't use
"C:\Chocolatey"
unless necessary. - Create the folder manually.
-
If you have already installed (and want to change the location after the fact):
- Follow the above steps.
- Install Chocolatey again.
- Copy/Move over the items from the old lib/bin directory.
- Delete your old install directory.
There is one really important consideration when installing Chocolatey to a non-default location: Chocolatey only locks down the permissions to Admins when installed to the default location %PROGRAMDATA%\Chocolatey
, which means the same thing as %SystemDrive%\ProgramData\Chocolatey
.
If you are installing to another location, you will need to handle this yourself, i. e. restrict write access to Admins in case you so desire.
This is due to alternative locations could have a range of permissions that should not be changed.
See Why does Chocolatey install where it does and https://github.com/chocolatey/choco/issues/398 for more details.
Basic Chocolatey Install
Chocolatey installs in seconds. You are just a few steps from running choco right now!
- First, ensure that you are using an administrative shell - you can also install as a non-admin, check out Non-Administrative Installation.
-
Copy the text specific to your command shell below.
WARNINGPlease inspect https://community.chocolatey.org/install.ps1 prior to running any of these scripts to ensure safety. We already know it's safe, but you should verify the security and contents of any script from the internet you are not familiar with. All of these scripts download a remote PowerShell script and execute it on your machine. We take security very seriously. Learn more about our security protocols.
Install with cmd.exe
Run the following command:
>Install with powershell.exe
With PowerShell, there is an additional step. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using
Bypass
to bypass the policy to get things installed orAllSigned
for quite a bit more security.- Run
Get-ExecutionPolicy
. If it returnsRestricted
, then runSet-ExecutionPolicy AllSigned
orSet-ExecutionPolicy Bypass -Scope Process
.
Now run the following command:
> - Run
- Paste the copied text into your shell and press Enter.
- Wait a few seconds for the command to complete.
- If you don't see any errors, you are ready to use Chocolatey! Type
choco
orchoco -?
now, or see Getting Started for usage instructions.
Install from PowerShell v3+
With PowerShell, there is an additional step or two. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass
to bypass the policy to get things installed or AllSigned
for quite a bit more security.
- Run
Get-ExecutionPolicy
. If it returnsRestricted
, then runSet-ExecutionPolicy AllSigned
orSet-ExecutionPolicy Bypass
. - Now run the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex
Completely Offline Install
With completely offline use of Chocolatey, you want to ensure you remove the default community package source (choco source list
followed by choco source remove -n chocolatey
, or however you would do that with a configuration manager like Puppet).
- The first step with offline is to obtain a copy of the Chocolatey Nupkg (nupkg files are just fancy zip files). Go to https://community.chocolatey.org/packages/chocolatey and find a version you want.
-
Click on Download to download that version's nupkg file.
- You can also download the latest version directly.
- You can put the chocolatey.nupkg on an internal package repository and then address that full path, similar to how you see in the Puppet provider - https://forge.puppet.com/puppetlabs/chocolatey#manage-chocolatey-installation
Then you would run a script similar to the below to address that local install. If it is on a repository somewhere, you will need to enhance the below script to get that file (the Chocolatey Puppet provider install script shows that).
# use an internal repository to download Chocolatey nupkg to the local path:
$packageRepo = '<INSERT REPO URL>'
# uncomment if you want to download the file from a remote OData (HTTP/HTTPS) internal url (such as Artifactory, Nexus, ProGet, or Chocolatey.Server)
#$searchUrl = ($packageRepo.Trim('/'), 'Packages()?$filter=(Id%20eq%20%27chocolatey%27)%20and%20IsLatestVersion') -join '/'
# UPDATE THIS PATH
$localChocolateyPackageFilePath = 'c:\packages\chocolatey.0.10.0.nupkg'
# Determine unzipping method
# 7zip is the most compatible, but you need an internally hosted 7za.exe.
# Make sure the version matches for the arguments as well.
# Built-in does not work with Server Core, but if you have PowerShell 5
# it uses Expand-Archive instead of COM
$unzipMethod = 'builtin'
#$unzipMethod = '7zip'
#$7zipUrl = 'https://community.chocolatey.org/7za.exe' (download this file, host internally, and update this to internal)
$ChocoInstallPath = "$($env:SystemDrive)\ProgramData\Chocolatey\bin"
$env:ChocolateyInstall = "$($env:SystemDrive)\ProgramData\Chocolatey"
$env:Path += ";$ChocoInstallPath"
$DebugPreference = "Continue";
# if you really want to see debugging output related to the
# installation, uncomment the next line
#$env:ChocolateyEnvironmentDebug = 'true'
function Get-Downloader {
param (
[string]$url
)
$downloader = new-object System.Net.WebClient
$defaultCreds = [System.Net.CredentialCache]::DefaultCredentials
if ($defaultCreds -ne $null) {
$downloader.Credentials = $defaultCreds
}
$ignoreProxy = $env:chocolateyIgnoreProxy
if ($ignoreProxy -ne $null -and $ignoreProxy -eq 'true') {
Write-Debug "Explicitly bypassing proxy due to user environment variable"
$downloader.Proxy = [System.Net.GlobalProxySelection]::GetEmptyWebProxy()
} else {
# check if a proxy is required
$explicitProxy = $env:chocolateyProxyLocation
$explicitProxyUser = $env:chocolateyProxyUser
$explicitProxyPassword = $env:chocolateyProxyPassword
if ($explicitProxy -ne $null -and $explicitProxy -ne '') {
# explicit proxy
$proxy = New-Object System.Net.WebProxy($explicitProxy, $true)
if ($explicitProxyPassword -ne $null -and $explicitProxyPassword -ne '') {
$passwd = ConvertTo-SecureString $explicitProxyPassword -AsPlainText -Force
$proxy.Credentials = New-Object System.Management.Automation.PSCredential ($explicitProxyUser, $passwd)
}
Write-Debug "Using explicit proxy server '$explicitProxy'."
$downloader.Proxy = $proxy
} elseif (!$downloader.Proxy.IsBypassed($url)) {
# system proxy (pass through)
$creds = $defaultCreds
if ($creds -eq $null) {
Write-Debug "Default credentials were null. Attempting backup method"
$cred = get-credential
$creds = $cred.GetNetworkCredential();
}
$proxyaddress = $downloader.Proxy.GetProxy($url).Authority
Write-Debug "Using system proxy server '$proxyaddress'."
$proxy = New-Object System.Net.WebProxy($proxyaddress)
$proxy.Credentials = $creds
$downloader.Proxy = $proxy
}
}
return $downloader
}
function Download-File {
param (
[string]$url,
[string]$file
)
#Write-Output "Downloading $url to $file"
$downloader = Get-Downloader $url
$downloader.DownloadFile($url, $file)
}
function Download-Package {
param (
[string]$packageODataSearchUrl,
[string]$file
)
$downloader = Get-Downloader $packageODataSearchUrl
Write-Output "Querying latest package from $packageODataSearchUrl"
[xml]$pkg = $downloader.DownloadString($packageODataSearchUrl)
$packageDownloadUrl = $pkg.feed.entry.content.src
Write-Output "Downloading $packageDownloadUrl to $file"
$downloader.DownloadFile($packageDownloadUrl, $file)
}
function Install-LocalChocolateyPackage {
param (
[string]$chocolateyPackageFilePath = ''
)
if ($chocolateyPackageFilePath -eq $null -or $chocolateyPackageFilePath -eq '') {
throw "You must specify a local package to run the local install."
}
if (!(Test-Path($chocolateyPackageFilePath))) {
throw "No file exists at $chocolateyPackageFilePath"
}
if ($env:TEMP -eq $null) {
$env:TEMP = Join-Path $env:SystemDrive 'temp'
}
$chocTempDir = Join-Path $env:TEMP "chocolatey"
$tempDir = Join-Path $chocTempDir "chocInstall"
if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)}
$file = Join-Path $tempDir "chocolatey.zip"
Copy-Item $chocolateyPackageFilePath $file -Force
# unzip the package
Write-Output "Extracting $file to $tempDir..."
if ($unzipMethod -eq '7zip') {
$7zaExe = Join-Path $tempDir '7za.exe'
if (-Not (Test-Path ($7zaExe))) {
Write-Output "Downloading 7-Zip commandline tool prior to extraction."
# download 7zip
Download-File $7zipUrl "$7zaExe"
}
$params = "x -o`"$tempDir`" -bd -y `"$file`""
# use more robust Process as compared to Start-Process -Wait (which doesn't
# wait for the process to finish in PowerShell v3)
$process = New-Object System.Diagnostics.Process
$process.StartInfo = New-Object System.Diagnostics.ProcessStartInfo($7zaExe, $params)
$process.StartInfo.RedirectStandardOutput = $true
$process.StartInfo.UseShellExecute = $false
$process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
$process.Start() | Out-Null
$process.BeginOutputReadLine()
$process.WaitForExit()
$exitCode = $process.ExitCode
$process.Dispose()
$errorMessage = "Unable to unzip package using 7zip. Perhaps try setting `$env:chocolateyUseWindowsCompression = 'true' and call install again. Error:"
switch ($exitCode) {
0 { break }
1 { throw "$errorMessage Some files could not be extracted" }
2 { throw "$errorMessage 7-Zip encountered a fatal error while extracting the files" }
7 { throw "$errorMessage 7-Zip command line error" }
8 { throw "$errorMessage 7-Zip out of memory" }
255 { throw "$errorMessage Extraction cancelled by the user" }
default { throw "$errorMessage 7-Zip signalled an unknown error (code $exitCode)" }
}
} else {
if ($PSVersionTable.PSVersion.Major -lt 5) {
try {
$shellApplication = new-object -com shell.application
$zipPackage = $shellApplication.NameSpace($file)
$destinationFolder = $shellApplication.NameSpace($tempDir)
$destinationFolder.CopyHere($zipPackage.Items(),0x10)
} catch {
throw "Unable to unzip package using built-in compression. Set `$env:chocolateyUseWindowsCompression = 'false' and call install again to use 7zip to unzip. Error: `n $_"
}
} else {
Expand-Archive -Path "$file" -DestinationPath "$tempDir" -Force
}
}
# Call chocolatey install
Write-Output "Installing chocolatey on this machine"
$toolsFolder = Join-Path $tempDir "tools"
$chocInstallPS1 = Join-Path $toolsFolder "chocolateyInstall.ps1"
& $chocInstallPS1
Write-Output 'Ensuring chocolatey commands are on the path'
$chocInstallVariableName = "ChocolateyInstall"
$chocoPath = [Environment]::GetEnvironmentVariable($chocInstallVariableName)
if ($chocoPath -eq $null -or $chocoPath -eq '') {
$chocoPath = 'C:\ProgramData\Chocolatey'
}
$chocoExePath = Join-Path $chocoPath 'bin'
if ($($env:Path).ToLower().Contains($($chocoExePath).ToLower()) -eq $false) {
$env:Path = [Environment]::GetEnvironmentVariable('Path',[System.EnvironmentVariableTarget]::Machine);
}
}
# Idempotence - do not install Chocolatey if it is already installed
if (!(Test-Path $ChocoInstallPath)) {
# download the package to the local path
if ($searchUrl) {
Download-Package $searchUrl $localChocolateyPackageFilePath
}
# Install Chocolatey
Install-LocalChocolateyPackage $localChocolateyPackageFilePath
}
Install with Puppet
NOTE: If you have the licensed edition, see Setting up Licensed Edition with Puppet instead. This only additionally contains some package examples and setting up tab completion.
Here's an example of setting Chocolatey up with Puppet that sets up and configures Chocolatey, sets up an internal package repository, and shows setting up the licensed edition and ensuring some packages.
- Download the chocolatey.nupkg from the community repository - download the latest chocolatey nupkg or see Completely offline install to get an older version.
- Optionally download the chocolatey.server package from the community repository - download the latest chocolatey.server nupkg.
- Use
choco push
to push those items to your internal package repository (e.g.choco push chocolatey.0.10.7.nupkg -s http://internal_repo/ -k abc123
) - Determine how to get the bare url to download the Chocolatey.Nupkg directly. You will need that for the internal url for installing Chocolatey offline. For the community repository, it is https://community.chocolatey.org/api/v2/package/chocolatey
# Requires puppetlabs/chocolatey module
# See https://forge.puppet.com/puppetlabs/chocolatey
## Set resource defaults for `package` resources on Windows to use the Chocolatey provider
case $operatingsystem {
'windows': {
Package {
provider => chocolatey,
}
}
}
## - Ensure Chocolatey Install -
#include chocolatey
## OR
## Download chocolatey.nupkg to your internal repository (see above
## about getting the package for offline use)
## Note: `chocolatey_download_url is completely different than normal
## source locations. This is directly to the bare download url for the
## chocolatey.nupkg, similar to what you see when you browse to
## https://community.chocolatey.org/api/v2/package/chocolatey
class {'chocolatey':
chocolatey_download_url => 'https://<internalurl/to>/chocolatey.nupkg',
use_7zip => false,
}
## If you need FIPS compliance
## make this the first thing you configure before you do any additional
## configuration or package installations
#chocolateyfeature {'useFipsCompliantChecksums':
# ensure => enabled,
#}
## Keep chocolatey up to date based on your internal source
## You control the upgrades based on when you push an updated version
## to your internal repository.
## Note the source here is to the OData feed, similar to what you see
## when you browse to https://community.chocolatey.org/api/v2
package {'chocolatey':
ensure => latest,
provider => chocolatey,
source => 'https://<internal_repo>/chocolatey',
}
## - Configure Chocolatey -
### Config Settings
## Move cache location so Chocolatey is very deterministic about
## cleaning up temporary data
chocolateyconfig {'cacheLocation':
value => 'c:\ProgramData\choco-cache',
}
## Increase timeout to 4 hours
chocolateyconfig {'commandExecutionTimeoutSeconds':
value => '14400',
}
### Sources
## Remove the default community package repository source
chocolateysource {'chocolatey':
ensure => absent,
location => 'https://community.chocolatey.org/api/v2/',
}
## Add default sources for your internal repositories
chocolateysource {'internal_chocolatey':
ensure => present,
location => 'http://internal_location/OData/endpoint',
priority => 1,
username => 'optional',
password => 'optional,not ensured',
}
### Features
chocolateyfeature {'checksumFiles':
ensure => enabled,
}
## When using Puppet for installs
chocolateyfeature {'showDownloadProgress':
ensure => disabled,
}
chocolateyfeature {'useRememberedArgumentsForUpgrades':
ensure => enabled,
}
## - Chocolatey Simple Server Package Repository -
## Requires chocolatey/chocolatey_server module - see
## https://forge.puppet.com/chocolatey/chocolatey_server
## this contains the bits to install the custom server
## - Ensures IIS and Ensure ASP.NET
## - Installs and configures the Chocolatey.Server website and app pool
## - Sets permissions appropriately
#include chocolatey_server
## OR
## `server_package_source` is to the OData feed, similar to what you see
## when you browse to https://community.chocolatey.org/api/v2
class {'chocolatey_server':
server_package_source => 'https://internalurl/odata/server',
}
chocolateysource {'local_chocolatey_server':
ensure => present,
location => 'http://localhost/chocolatey',
priority => 2,
}
## - Tab Completion -
## Ensure that when someone uses choco from powershell.exe, they have tab completion
file {'C:\Users\Administrator\Documents\WindowsPowerShell':
ensure => directory,
}
file {'C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1':
ensure => file,
content => '$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}',
}
## - Package Examples -
package {'roundhouse':
ensure => '0.8.5.0',
}
package {'git':
ensure => latest,
}
## see https://forge.puppet.com/puppetlabs/chocolatey#install-options-with-spaces
package {'launchy':
ensure => installed,
install_options => ['--override', '--installArgs','"', '/VERYSILENT','/NORESTART','"'],
}
package {['virustotaluploader',
'googlechrome',
'notepadplusplus',
'7zip',
'ruby',
'charles',
'grepwin',
'stexbar',
'inkscape',
'gitextensions',
'pandoc',
'snagit',
'nodejs',
]:
ensure => latest,
source => 'https://community.chocolatey.org/api/v2/',
}
package {'screentogif':
ensure => '2.2.160907',
source => 'https://community.chocolatey.org/api/v2/',
}
package {'dotnet4.5.2':
ensure => latest,
}
Install using PowerShell from cmd.exe
This is the best method if you want to repeat it or include it in source control. It requires no change to your existing PowerShell to allow for remote unsigned scripts.
Create a file named installChocolatey.cmd
with the following:
@echo off
SET DIR=%~dp0%
::download install.ps1
%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "((new-object net.webclient).DownloadFile('https://community.chocolatey.org/install.ps1','%DIR%install.ps1'))"
::run installer
%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& '%DIR%install.ps1' %*"
You can also get to this file by going to https://community.chocolatey.org/installChocolatey.cmd.
If you prefer to have the install.ps1 file already, comment out the download line in the batch file and download the install.ps1
from chocolatey.org and save it as install.ps1
next to the installChocolatey.cmd
file.
Run installChocolatey.cmd
from an elevated cmd.exe
command prompt and it will install the latest version of Chocolatey. You can not run this from powershell.exe
without making changes to your execution policy.
NOTE: To create and save a .cmd
file, please use a text editor and nothing fancy like Microsoft Word or OneNote.
Install using NuGet Package Manager
When you have Visual Studio 2010+ and the NuGet extension installed (pre-installed on any newer versions of Visual Studio), you can simply type the following three commands and you will have Chocolatey installed on your machine.
Install-Package chocolatey
Initialize-Chocolatey
Uninstall-Package chocolatey
Install using NuGet.exe from PowerShell
You can also use NuGet command line to download Chocolatey:
nuget install chocolatey
or nuget install chocolatey -pre
Once you download it, open PowerShell (remote unsigned), navigate to the tools folder and run:
& .\chocolateyInstall.ps1
Install Downloaded NuGet Package from PowerShell
You can also just download and unzip the Chocolatey package (.nupkg
is a fancy zip file):
- Download the Chocolatey package.
- Ensure the downloaded nupkg is not blocked.
- Unzip it using any application that supports
zip
format. - Open a PowerShell command shell and navigate into the unzipped package's tools folder.
- NOTE: Ensure PowerShell execution policy is set to at least bypass or remote signed (if you have issues, you may need to set it to Unrestricted).
- Call
& .\chocolateyInstall.ps1
to allow Chocolatey to install. - NOTE: This will not set Chocolatey as an installed package, so it may be a good idea to also call
choco upgrade chocolatey -y
and let it reinstall the same version, but at least it will be available for upgrades then.
Install Licensed Edition
Looks like this installation method might be better reviewing in our docs. After you have Chocolatey installed, come back here to take the quiz to earn your badge!
Installing Behind a Proxy
Install with cmd.exe
Run the following command:
Install with powershell.exe
(Ensure Get-ExecutionPolicy is at least RemoteSigned).
Now run the following command:
Installing Behind a Explicit Proxy
Looks like this installation method might be better reviewing in our docs. After you have Chocolatey installed, come back here to take the quiz to earn your badge!
Installing with Restricted TLS
If your server is restricted to TLS 1.1+, you need to add additional logic to be able to download and install Chocolatey (this is not necessary when running Chocolatey normally as it does this automatically). If this is for organizational use, you should consider hosting the Chocolatey package internally and installing from there. Otherwise, please see this section.
If you see an error that looks similar to the following:
Exception calling "DownloadString" with "1" argument(s): "The underlying connection was closed: An unexpected error
occurred on a receive."
At line:1 char:1
+ iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/in ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
It's possible that you are attempting to install from a server that needs to use TLS 1.1 or TLS 1.2 (has restricted the use of TLS 1.0 and SSL v3), you have some options.
Option 1
If you have the following:
- PowerShell v3+
- .NET Framework 4.5
You can just run the following instead of just the one-liner to get Chocolatey installed:
$securityProtocolSettingsOriginal = [System.Net.ServicePointManager]::SecurityProtocol
try {
# Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48)
# Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't
# exist in .NET 4.0, even though they are addressable if .NET 4.5+ is
# installed (.NET 4.5 is an in-place upgrade).
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48
} catch {
Write-Warning 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to do one or more of the following: (1) upgrade to .NET Framework 4.5 and PowerShell v3, (2) specify internal Chocolatey package location (set $env:chocolateyDownloadUrl prior to install or host the package internally), (3) use the Download + PowerShell method of install. See https://community.chocolatey.org/install for all install options.'
}
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
[System.Net.ServicePointManager]::SecurityProtocol = $securityProtocolSettingsOriginal
Option 2
You need to download and unzip the Chocolatey package, then call the PowerShell install script from there.
Non-Administrative Install
This option should be a last resort and is considered to be a more advanced scenario - most things you do on Windows require administrative rights, especially surrounding software management, so you are going to be limited even in packages you attempt to install. If you are using the community package repository, there are over 200 packages you can install from the community repository without administrative permission - see https://community.chocolatey.org/packages?q=id%3Aportable+tag%3Aportable.
- You must choose a different location than the default (see Installing to a different location above). The default is a more secure location that only administrators can update.
- Follow that with the command line / PowerShell methods of installation.
- Here is an example of this.
NonAdmin.ps1:
# Set directory for installation - Chocolatey does not lock
# down the directory if not the default
$InstallDir='C:\ProgramData\chocoportable'
$env:ChocolateyInstall="$InstallDir"
# If your PowerShell Execution policy is restrictive, you may
# not be able to get around that. Try setting your session to
# Bypass.
Set-ExecutionPolicy Bypass
# All install options - offline, proxy, etc at
# https://chocolatey.org/install
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# PowerShell 3+?
#iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install puppet-agent.portable -y
choco install ruby.portable -y
choco install git.commandline -y
# pick an editor
#choco install visualstudiocode.portable -y # not yet available
choco install notepadplusplus.commandline -y
#choco install nano -y
#choco install vim-tux.portable
# What else can I install without admin rights?
# https://community.chocolatey.org/packages?q=id%3Aportable
If you prefer or need cmd.exe example, please see https://gist.github.com/ferventcoder/78fa6b6f4d6e2b12c89680cbc0daec78