Welcome to the Chocolatey Community Package Repository! The packages found in this section of the site are provided, maintained, and moderated by the community.
Moderation
Every version of each package undergoes a rigorous moderation process before it goes live that typically includes:
- Security, consistency, and quality checking
- Installation testing
- Virus checking through VirusTotal
- Human moderators who give final review and sign off
More detail at Security and Moderation.
Organizational Use
If you are an organization using Chocolatey, we want your experience to be fully reliable. Due to the nature of this publicly offered repository, reliability cannot be guaranteed. Packages offered here are subject to distribution rights, which means they may need to reach out further to the internet to the official locations to download files at runtime.
Fortunately, distribution rights do not apply for internal use. With any edition of Chocolatey (including the free open source edition), you can host your own packages and cache or internalize existing community packages.
Disclaimer
Your use of the packages on this site means you understand they are not supported or guaranteed in any way. Learn more...
-
STEP1
Package Review
-
STEP2
Integration Method
-
STEP3
Internal Repo Url
-
STEP4
Environment Setup
-
STEP5
Install Script
Step 1: Review Your Packages
Step 2: Choose Your Integration Method
Step 3: Enter Your Internal Repository Url
(this should look similar to https://community.chocolatey.org/api/v2/)
Step 3: Copy Your Script or Download Config
Option 1: Copy Script
Option 2: Download Config
Step 4: Setup Your Environment
1. Ensure you are set for organizational deployment
Please see the organizational deployment guide
2. Get the package into your environment
Option 1: Cached Package (Unreliable, Requires Internet - Same As Community)-
Open Source or Commercial:
- Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
-
You can also just download the packages and push them to a repository
Download Packages
-
Open Source
-
Download the packages:
Download Packages - Follow manual internalization instructions
-
-
Package Internalizer (C4B)
-
Run: (additional options)
-
For package and dependencies run:
- Automate package internalization
-
Run: (additional options)
Step 5: Copy Your Script
See options you can pass to upgrade.
See best practices for scripting.
Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.
If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:
## 1. REQUIREMENTS ##
### Here are the requirements necessary to ensure this is successful.
### a. Internal/Private Cloud Repository Set Up ###
#### You'll need an internal/private cloud repository you can use. These are
#### generally really quick to set up and there are quite a few options.
#### Chocolatey Software recommends Nexus, Artifactory Pro, or ProGet as they
#### are repository servers and will give you the ability to manage multiple
#### repositories and types from one server installation.
### b. Download Chocolatey Package and Put on Internal Repository ###
#### You need to have downloaded the Chocolatey package as well.
#### Please see https://chocolatey.org/install#organization
### c. Other Requirements ###
#### We initialize a few things that are needed by this script - there are no other requirements.
$ErrorActionPreference = "Stop"
#### Set TLS 1.2 (3072) as that is the minimum required by various up-to-date repositories.
#### Use integers because the enumeration value for TLS 1.2 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 = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
#### We use this variable for future REST calls.
$RequestArguments = @{
UseBasicParsing = $true
}
## 2. TOP LEVEL VARIABLES ##
### a. Your internal repository url (the main one). ###
#### Should be similar to what you see when you browse
#### to https://community.chocolatey.org/api/v2/
$NugetRepositoryUrl = "INTERNAL REPO URL"
### b. Internal Repository Credential ###
#### If required, add the repository access credential here
# $NugetRepositoryCredential = [PSCredential]::new(
# "username",
# ("password" | ConvertTo-SecureString -AsPlainText -Force)
# )
# $RequestArguments.Credential = $NugetRepositoryCredential
### c. Chocolatey nupkg download url ###
#### This url should result in an immediate download when you navigate to it
$ChocolateyDownloadUrl = "$($NugetRepositoryUrl.TrimEnd('/'))/package/chocolatey.1.1.0.nupkg"
### d. Chocolatey Central Management (CCM) ###
#### If using CCM to manage Chocolatey, add the following:
#### i. Endpoint URL for CCM
# $ChocolateyCentralManagementUrl = "https://chocolatey-central-management:24020/ChocolateyManagementService"
#### ii. If using a Client Salt, add it here
# $ChocolateyCentralManagementClientSalt = "clientsalt"
#### iii. If using a Service Salt, add it here
# $ChocolateyCentralManagementServiceSalt = "servicesalt"
## 3. ENSURE CHOCOLATEY IS INSTALLED ##
### Ensure Chocolatey is installed from your internal repository
#### Download the Nupkg, appending .zip to the filename to handle archive cmdlet limitations
if (-not (Get-Command choco.exe -ErrorAction SilentlyContinue)) {
$TempDirectory = Join-Path $env:Temp "chocolateyInstall"
if (-not (Test-Path $TempDirectory -PathType Container)) {
$null = New-Item -Path $TempDirectory -ItemType Directory
}
$DownloadedNupkg = Join-Path $TempDirectory "$(Split-Path $ChocolateyDownloadUrl -Leaf).zip"
Invoke-WebRequest -Uri $ChocolateyDownloadUrl -OutFile $DownloadedNupkg @RequestArguments
#### Extract the Nupkg, and run the chocolateyInstall script
if (Get-Command Microsoft.PowerShell.Archive\Expand-Archive -ErrorAction SilentlyContinue) {
Microsoft.PowerShell.Archive\Expand-Archive -Path $DownloadedNupkg -DestinationPath $TempDirectory -Force
} else {
# PowerShell versions <4.0 do not have this function available
try {
$shellApplication = New-Object -ComObject Shell.Application
$zipPackage = $shellApplication.NameSpace($DownloadedNupkg)
$destinationFolder = $shellApplication.NameSpace($TempDirectory)
$destinationFolder.CopyHere($zipPackage.Items(), 0x10)
} catch {
Write-Warning "Unable to unzip package using built-in compression."
throw $_
}
}
& $(Join-Path $TempDirectory "tools\chocolateyInstall.ps1")
}
if (-not (Get-Command choco.exe -ErrorAction SilentlyContinue)) {
refreshenv
}
## 4. CONFIGURE CHOCOLATEY BASELINE ##
### a. FIPS Feature ###
#### If you need FIPS compliance - make this the first thing you configure
#### before you do any additional configuration or package installations
# choco feature enable -n useFipsCompliantChecksums
### b. Apply Recommended Configuration ###
#### Move cache location so Chocolatey is very deterministic about
#### cleaning up temporary data and the location is secured to admins
choco config set --name cacheLocation --value C:\ProgramData\chocolatey\cache
#### Increase timeout to at least 4 hours
choco config set --name commandExecutionTimeoutSeconds --value 14400
#### Turn off download progress when running choco through integrations
choco feature disable --name showDownloadProgress
### c. Sources ###
#### Remove the default community package repository source
choco source list --limitoutput | ConvertFrom-Csv -Header 'Name', 'Location' -Delimiter '|' | ForEach-Object {
if ($_.Location -eq 'https://community.chocolatey.org/api/v2/') {
choco source remove -n $_.Name
}
}
#### Add internal default sources
#### You could have multiple sources here, so we will provide an example
#### of one using the remote repo variable here
#### NOTE: This EXAMPLE may require changes
if ($NugetRepositoryCredential) {
choco source add --name ChocolateyInternal --source $NugetRepositoryUrl --user $NugetRepositoryCredential.UserName --password $NugetRepositoryCredential.GetNetworkCredential().Password --priority 1
} else {
choco source add --name ChocolateyInternal --source $NugetRepositoryUrl --priority 1
}
### b. Keep Chocolatey Up To Date ###
#### 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/
choco upgrade chocolatey --confirm
## 5. ENSURE CHOCOLATEY FOR BUSINESS ##
### If you don't have Chocolatey for Business (C4B), you'll want to remove from here down.
### a. Ensure The License File Is Installed ###
#### Create a license package using script from https://docs.chocolatey.org/en-us/how-tos/setup-offline-installation#exercise-4-create-a-package-for-the-license
choco install chocolatey-license --source $NugetRepositoryUrl --confirm
### b. Disable The Licensed Source ###
#### The licensed source cannot be removed, so it must be disabled.
#### This must occur after the license has been set by the license package.
if ("chocolatey-license" -in (choco list --localonly --limitoutput | ConvertFrom-Csv -Header "Name" -Delimiter "|").Name) {
choco source disable --name chocolatey.licensed
} else {
Write-Warning "Not disabling 'chocolatey.licensed' feed, as Chocolatey-License has not been installed."
}
### c. Ensure Chocolatey Licensed Extension ###
#### You will have downloaded the licensed extension to your internal repository
#### as you have disabled the licensed repository in step 5b.
#### Ensure the chocolatey.extension package (aka Chocolatey Licensed Extension)
if ("chocolatey-license" -in (choco list --localonly --limitoutput | ConvertFrom-Csv -Header "Name" -Delimiter "|").Name) {
choco install chocolatey.extension --source $NugetRepositoryUrl --confirm
} else {
Write-Warning "Not installing 'chocolatey.extension', as Chocolatey-License has not been installed."
}
#### The Chocolatey Licensed Extension unlocks all of the following, which also have configuration/feature items available with them. You may want to visit the feature pages to see what you might want to also enable:
#### - Package Builder - https://docs.chocolatey.org/en-us/features/paid/package-builder
#### - Package Internalizer - https://docs.chocolatey.org/en-us/features/paid/package-internalizer
#### - Package Synchronization (3 components) - https://docs.chocolatey.org/en-us/features/paid/package-synchronization
#### - Package Reducer - https://docs.chocolatey.org/en-us/features/paid/package-reducer
#### - Package Audit - https://docs.chocolatey.org/en-us/features/paid/package-audit
#### - Package Throttle - https://docs.chocolatey.org/en-us/features/paid/package-throttle
#### - CDN Cache Access - https://docs.chocolatey.org/en-us/features/paid/private-cdn
#### - Branding - https://docs.chocolatey.org/en-us/features/paid/branding
#### - Self-Service Anywhere (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/self-service-anywhere
#### - Chocolatey Central Management (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/chocolatey-central-management
#### - Other - https://docs.chocolatey.org/en-us/features/paid/
### d. Ensure Self-Service Anywhere ###
#### If you have desktop clients where users are not administrators, you may
#### to take advantage of deploying and configuring Self-Service anywhere
choco feature disable --name showNonElevatedWarnings
choco feature enable --name useBackgroundService
choco feature enable --name useBackgroundServiceWithNonAdministratorsOnly
choco feature enable --name allowBackgroundServiceUninstallsFromUserInstallsOnly
choco config set --name allowedBackgroundServiceCommands --value "install,upgrade,uninstall"
### e. Ensure Chocolatey Central Management ###
#### If you want to manage and report on endpoints, you can set up and configure
### Central Management. There are multiple portions to manage, so you'll see
### a section on agents here along with notes on how to configure the server
### side components.
if ($ChocolateyCentralManagementUrl) {
choco install chocolatey-agent --source $NugetRepositoryUrl --confirm
choco config set --name CentralManagementServiceUrl --value $ChocolateyCentralManagementUrl
if ($ChocolateyCentralManagementClientSalt) {
choco config set --name centralManagementClientCommunicationSaltAdditivePassword --value $ChocolateyCentralManagementClientSalt
}
if ($ChocolateyCentralManagementServiceSalt) {
choco config set --name centralManagementServiceCommunicationSaltAdditivePassword --value $ChocolateyCentralManagementServiceSalt
}
choco feature enable --name useChocolateyCentralManagement
choco feature enable --name useChocolateyCentralManagementDeployments
}
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
If Applicable - Chocolatey Configuration/Installation
## 1. REQUIREMENTS ##
### Here are the requirements necessary to ensure this is successful.
### a. Internal/Private Cloud Repository Set Up ###
#### You'll need an internal/private cloud repository you can use. These are
#### generally really quick to set up and there are quite a few options.
#### Chocolatey Software recommends Nexus, Artifactory Pro, or ProGet as they
#### are repository servers and will give you the ability to manage multiple
#### repositories and types from one server installation.
### b. Download Chocolatey Package and Put on Internal Repository ###
#### You need to have downloaded the Chocolatey package as well.
#### Please see https://chocolatey.org/install#organization
### c. Other Requirements ###
#### i. chocolatey.chocolatey
##### You will require the chocolatey.chocolatey collection to be installed
##### on all machines using this playbook.
##### Please see https://github.com/chocolatey/chocolatey-ansible/#installing-the-collection-from-ansible-galaxy
- name: Install and Configure Chocolatey
hosts: all
## 2. TOP LEVEL VARIABLES ##
vars:
### a. Your internal repository url (the main one). ###
#### Should be similar to what you see when you browse
#### to https://community.chocolatey.org/api/v2/
nuget_repository_url: INTERNAL REPO URL
### b. Internal Repository Credential ###
#### If required, add the repository access credential here and
#### uncomment lines with source_username and source_password below
# nuget_repository_username: username
# nuget_repository_password: password
### c. Chocolatey Central Management (CCM) ###
#### If using CCM to manage Chocolatey, add the following:
#### i. Endpoint URL for CCM
# chocolatey_central_management_url: https://chocolatey-central-management:24020/ChocolateyManagementService
#### ii. If using a Client Salt, add it here
# chocolatey_central_management_client_salt: clientsalt
#### iii. If using a Service Salt, add it here
# chocolatey_central_management_service_salt: servicesalt
## 3. ENSURE CHOCOLATEY IS INSTALLED ##
### Ensure Chocolatey is installed from your internal repository
tasks:
- name: Install chocolatey
win_chocolatey:
name: chocolatey
source: {{ nuget_repository_url }}
# source_username: {{ nuget_repository_username }}
# source_password: {{ nuget_repository_password }}
## 4. CONFIGURE CHOCOLATEY BASELINE ##
### a. FIPS Feature ###
#### If you need FIPS compliance - make this the first thing you configure
#### before you do any additional configuration or package installations
# - name: Enable FIPS compliance
# win_chocolatey_feature:
# name: useFipsCompliantChecksums
# state: enabled
### b. Apply Recommended Configuration ###
#### Move cache location so Chocolatey is very deterministic about
#### cleaning up temporary data and the location is secured to admins
- name: Set the cache location
win_chocolatey_config:
name: cacheLocation
state: present
value: C:\ProgramData\chocolatey\cache
#### Increase timeout to at least 4 hours
- name: Set the command execution timeout
win_chocolatey_config:
name: commandExecutionTimeoutSeconds
state: present
value: 14400
#### Turn off download progress when running choco through integrations
- name: Disable showing download progress
win_chocolatey_feature:
name: showDownloadProgress
state: disabled
### c. Sources ###
#### Remove the default community package repository source
- name: Remove Chocolatey Community Repository
win_chocolatey_source:
name: chocolatey
state: absent
#### Add internal default sources
#### You could have multiple sources here, so we will provide an example
#### of one using the remote repo variable here
#### NOTE: This EXAMPLE may require changes
- name: Add Internal Repository
win_chocolatey_source:
name: ChocolateyInternal
state: present
source: {{ nuget_repository_url }}
# source_username: {{ nuget_repository_username }}
# source_password: {{ nuget_repository_password }}
priority: 1
### b. Keep Chocolatey Up To Date ###
#### 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/
- name: Upgrade Chocolatey
win_chocolatey:
name: chocolatey
state: latest
## 5. ENSURE CHOCOLATEY FOR BUSINESS ##
### If you don't have Chocolatey for Business (C4B), you'll want to remove from here down.
### a. Ensure The License File Is Installed ###
#### Create a license package using script from https://docs.chocolatey.org/en-us/how-tos/setup-offline-installation#exercise-4-create-a-package-for-the-license
- name: Install Chocolatey License
win_chocolatey:
name: chocolatey-license
source: ChocolateyInternal
state: latest
### b. Disable The Licensed Source ###
#### The licensed source cannot be removed, so it must be disabled.
#### This must occur after the license has been set by the license package.
- name: Disable Chocolatey Community Repository
win_chocolatey_source:
name: chocolatey.licensed
state: disabled
### c. Ensure Chocolatey Licensed Extension ###
#### You will have downloaded the licensed extension to your internal repository
#### as you have disabled the licensed repository in step 5b.
#### Ensure the chocolatey.extension package (aka Chocolatey Licensed Extension)
- name: Install Chocolatey Extension
win_chocolatey:
name: chocolatey.extension
source: ChocolateyInternal
state: latest
#### The Chocolatey Licensed Extension unlocks all of the following, which also have configuration/feature items available with them. You may want to visit the feature pages to see what you might want to also enable:
#### - Package Builder - https://docs.chocolatey.org/en-us/features/paid/package-builder
#### - Package Internalizer - https://docs.chocolatey.org/en-us/features/paid/package-internalizer
#### - Package Synchronization (3 components) - https://docs.chocolatey.org/en-us/features/paid/package-synchronization
#### - Package Reducer - https://docs.chocolatey.org/en-us/features/paid/package-reducer
#### - Package Audit - https://docs.chocolatey.org/en-us/features/paid/package-audit
#### - Package Throttle - https://docs.chocolatey.org/en-us/features/paid/package-throttle
#### - CDN Cache Access - https://docs.chocolatey.org/en-us/features/paid/private-cdn
#### - Branding - https://docs.chocolatey.org/en-us/features/paid/branding
#### - Self-Service Anywhere (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/self-service-anywhere
#### - Chocolatey Central Management (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/chocolatey-central-management
#### - Other - https://docs.chocolatey.org/en-us/features/paid/
### d. Ensure Self-Service Anywhere ###
#### If you have desktop clients where users are not administrators, you may
#### to take advantage of deploying and configuring Self-Service anywhere
- name: Hide not-elevated warnings
win_chocolatey_feature:
name: showNonElevatedWarnings
state: disabled
- name: Use background mode for self-service
win_chocolatey_feature:
name: useBackgroundService
state: enabled
- name: Use background service for non-admins
win_chocolatey_feature:
name: useBackgroundServiceWithNonAdministratorsOnly
state: enabled
- name: Allow background uninstallation for user installs
win_chocolatey_feature:
name: allowBackgroundServiceUninstallsFromUserInstallsOnly
state: enabled
- name: Set allowed background service commands
win_chocolatey_config:
name: backgroundServiceAllowedCommands
state: present
value: install,upgrade,uninstall
### e. Ensure Chocolatey Central Management ###
#### If you want to manage and report on endpoints, you can set up and configure
### Central Management. There are multiple portions to manage, so you'll see
### a section on agents here along with notes on how to configure the server
### side components.
- name: Install Chocolatey Agent
when: chocolatey_central_management_url is defined
win_chocolatey:
name: chocolatey-agent
source: ChocolateyInternal
state: latest
- name: Set the Central Management Service URL
when: chocolatey_central_management_url is defined
win_chocolatey_config:
name: CentralManagementServiceUrl
state: present
value: {{ chocolatey_central_management_url }}
- name: Set the Central Management Client Salt
when: chocolatey_central_management_client_salt is defined
win_chocolatey_config:
name: centralManagementClientCommunicationSaltAdditivePassword
state: present
value: {{ chocolatey_central_management_client_salt }}
- name: Set the Central Management Service Salt
when: chocolatey_central_management_service_salt is defined
win_chocolatey_config:
name: centralManagementServiceCommunicationSaltAdditivePassword
state: present
value: {{ chocolatey_central_management_service_salt }}
- name: Use Central Management
when: chocolatey_central_management_url is defined
win_chocolatey_feature:
name: useChocolateyCentralManagement
state: enabled
- name: Use Central Management Deployments
when: chocolatey_central_management_url is defined
win_chocolatey_feature:
name: useChocolateyCentralManagementDeployments
state: enabled
See docs at https://docs.chef.io/resource_chocolatey_package.html.
If Applicable - Chocolatey Configuration/Installation
## 1. REQUIREMENTS ##
### Here are the requirements necessary to ensure this is successful.
### a. Internal/Private Cloud Repository Set Up ###
#### You'll need an internal/private cloud repository you can use. These are
#### generally really quick to set up and there are quite a few options.
#### Chocolatey Software recommends Nexus, Artifactory Pro, or ProGet as they
#### are repository servers and will give you the ability to manage multiple
#### repositories and types from one server installation.
### b. Download Chocolatey Package and Put on Internal Repository ###
#### You need to have downloaded the Chocolatey package as well.
#### Please see https://chocolatey.org/install#organization
### c. Other Requirements ###
#### The Chocolatey resources are available with any recent version of Chef.
#### We utilise the Chocolatey recipe to install the Chocolatey binaries.
include_recipe "chocolatey"
## 2. TOP LEVEL VARIABLES ##
### a. Your internal repository url (the main one). ###
#### Should be similar to what you see when you browse
#### to https://community.chocolatey.org/api/v2/
NugetRepositoryUrl = "INTERNAL REPO URL"
### b. Internal Repository Credential ###
#### If required, add the repository access credential here
# NugetRepositoryUsername = "username"
# NugetRepositoryPassword = "password"
### c. Chocolatey nupkg download url ###
#### This url should result in an immediate download when you navigate to it in
#### a web browser
ChocolateyNupkgUrl = "INTERNAL REPO URL/package/chocolatey.1.1.0.nupkg",
### d. Chocolatey Central Management (CCM) ###
#### If using CCM to manage Chocolatey, add the following:
#### i. Endpoint URL for CCM
# ChocolateyCentralManagementUrl = "https://chocolatey-central-management:24020/ChocolateyManagementService"
#### ii. If using a Client Salt, add it here
# ChocolateyCentralManagementClientSalt = "clientsalt"
#### iii. If using a Service Salt, add it here
# ChocolateyCentralManagementServiceSalt = "servicesalt"
## 3. ENSURE CHOCOLATEY IS INSTALLED ##
### Ensure Chocolatey is installed from your internal repository
node['chocolatey']['install vars'] = {
'chocolateyDownloadUrl' => "#{ChocolateyNupkgUrl}",
}
## 4. CONFIGURE CHOCOLATEY BASELINE ##
### a. FIPS Feature ###
#### If you need FIPS compliance - make this the first thing you configure
#### before you do any additional configuration or package installations
# chocolatey_feature 'useFipsCompliantChecksums' do
# action :enable
# end
### b. Apply Recommended Configuration ###
#### Move cache location so Chocolatey is very deterministic about
#### cleaning up temporary data and the location is secured to admins
chocolatey_config 'cacheLocation' do
value 'C:\ProgramData\chocolatey\cache'
end
#### Increase timeout to at least 4 hours
chocolatey_config 'commandExecutionTimeoutSeconds' do
value '14400'
end
#### Turn off download progress when running choco through integrations
chocolatey_feature 'showDownloadProgress' do
action :disable
end
### c. Sources ###
#### Remove the default community package repository source
chocolatey_source 'chocolatey' do
action :remove
end
#### Add internal default sources
#### You could have multiple sources here, so we will provide an example
#### of one using the remote repo variable here
#### NOTE: This EXAMPLE may require changes
chocolatey_source 'ChocolateyInternal' do
source "#{NugetRepositoryUrl}"
priority 1
action :add
end
execute 'ChocolateyInternal' do
command "choco source add --name ChocolateyInternal -s #{NugetRepositoryUrl} -u=#{NugetRepositoryUsername} -p=#{NugetRepositoryPassword} --priority=1"
only_if { NugetRepositoryUsername != nil || NugetRepositoryPassword != nil }
end
### b. Keep Chocolatey Up To Date ###
#### 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/
chocolatey_package 'chocolatey' do
action :upgrade
source "#{NugetRepositoryUrl}"
end
## 5. ENSURE CHOCOLATEY FOR BUSINESS ##
### If you don't have Chocolatey for Business (C4B), you'll want to remove from here down.
### a. Ensure The License File Is Installed ###
#### Create a license package using script from https://docs.chocolatey.org/en-us/how-tos/setup-offline-installation#exercise-4-create-a-package-for-the-license
chocolatey_package 'chocolatey-license' do
action :install
source "#{NugetRepositoryUrl}"
end
### b. Disable The Licensed Source ###
#### The licensed source cannot be removed, so it must be disabled.
#### This must occur after the license has been set by the license package.
chocolatey_source 'chocolatey.licensed' do
action :disable
end
### c. Ensure Chocolatey Licensed Extension ###
#### You will have downloaded the licensed extension to your internal repository
#### as you have disabled the licensed repository in step 5b.
#### Ensure the chocolatey.extension package (aka Chocolatey Licensed Extension)
chocolatey_package 'chocolatey.extention' do
action install
source "#{NugetRepositoryUrl}"
end
#### The Chocolatey Licensed Extension unlocks all of the following, which also have configuration/feature items available with them. You may want to visit the feature pages to see what you might want to also enable:
#### - Package Builder - https://docs.chocolatey.org/en-us/features/paid/package-builder
#### - Package Internalizer - https://docs.chocolatey.org/en-us/features/paid/package-internalizer
#### - Package Synchronization (3 components) - https://docs.chocolatey.org/en-us/features/paid/package-synchronization
#### - Package Reducer - https://docs.chocolatey.org/en-us/features/paid/package-reducer
#### - Package Audit - https://docs.chocolatey.org/en-us/features/paid/package-audit
#### - Package Throttle - https://docs.chocolatey.org/en-us/features/paid/package-throttle
#### - CDN Cache Access - https://docs.chocolatey.org/en-us/features/paid/private-cdn
#### - Branding - https://docs.chocolatey.org/en-us/features/paid/branding
#### - Self-Service Anywhere (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/self-service-anywhere
#### - Chocolatey Central Management (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/chocolatey-central-management
#### - Other - https://docs.chocolatey.org/en-us/features/paid/
### d. Ensure Self-Service Anywhere ###
#### If you have desktop clients where users are not administrators, you may
#### to take advantage of deploying and configuring Self-Service anywhere
chocolatey_feature 'showNonElevatedWarnings' do
action :disable
end
chocolatey_feature 'useBackgroundService' do
action :enable
end
chocolatey_feature 'useBackgroundServiceWithNonAdministratorsOnly' do
action :enable
end
chocolatey_feature 'allowBackgroundServiceUninstallsFromUserInstallsOnly' do
action :enable
end
chocolatey_config 'backgroundServiceAllowedCommands' do
value 'install,upgrade,uninstall'
end
### e. Ensure Chocolatey Central Management ###
#### If you want to manage and report on endpoints, you can set up and configure
### Central Management. There are multiple portions to manage, so you'll see
### a section on agents here along with notes on how to configure the server
### side components.
chocolatey_package 'chocolatey-agent' do
action install
source "#{NugetRepositoryUrl}"
# user "#{NugetRepositoryUsername}"
# password "#{NugetRepositoryPassword}"
only_if { ChocolateyCentralManagementUrl != nil }
end
chocolatey_config 'CentralManagementServiceUrl' do
value "#{ChocolateyCentralManagementUrl}"
only_if { ChocolateyCentralManagementUrl != nil }
end
chocolatey_config 'centralManagementClientCommunicationSaltAdditivePassword' do
value "#{ChocolateyCentralManagementClientSalt}"
only_if { ChocolateyCentralManagementClientSalt != nil }
end
chocolatey_config 'centralManagementServiceCommunicationSaltAdditivePassword' do
value "#{ChocolateyCentralManagementServiceSalt}"
only_if { ChocolateyCentralManagementServiceSalt != nil }
end
chocolatey_feature 'useChocolateyCentralManagement' do
action :enable
only_if { ChocolateyCentralManagementUrl != nil }
end
chocolatey_feature 'useChocolateyCentralManagementDeployments' do
action :enable
only_if { ChocolateyCentralManagementUrl != nil }
end
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
If Applicable - Chocolatey Configuration/Installation
#requires -Modules cChoco
## 1. REQUIREMENTS ##
### Here are the requirements necessary to ensure this is successful.
### a. Internal/Private Cloud Repository Set Up ###
#### You'll need an internal/private cloud repository you can use. These are
#### generally really quick to set up and there are quite a few options.
#### Chocolatey Software recommends Nexus, Artifactory Pro, or ProGet as they
#### are repository servers and will give you the ability to manage multiple
#### repositories and types from one server installation.
### b. Download Chocolatey Package and Put on Internal Repository ###
#### You need to have downloaded the Chocolatey package as well.
#### Please see https://chocolatey.org/install#organization
### c. Other Requirements ###
#### i. Requires chocolatey\cChoco DSC module to be installed on the machine compiling the DSC manifest
#### NOTE: This will need to be installed before running the DSC portion of this script
if (-not (Get-Module cChoco -ListAvailable)) {
$null = Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
if (($PSGallery = Get-PSRepository -Name PSGallery).InstallationPolicy -ne "Trusted") {
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
}
Install-Module -Name cChoco
if ($PSGallery.InstallationPolicy -ne "Trusted") {
Set-PSRepository -Name PSGallery -InstallationPolicy $PSGallery.InstallationPolicy
}
}
#### ii. Requires a hosted copy of the install.ps1 script
##### This should be available to download without authentication.
##### The original script can be found here: https://community.chocolatey.org/install.ps1
Configuration ChocolateyConfig {
## 2. TOP LEVEL VARIABLES ##
param(
### a. Your internal repository url (the main one). ###
#### Should be similar to what you see when you browse
#### to https://community.chocolatey.org/api/v2/
$NugetRepositoryUrl = "INTERNAL REPO URL",
### b. Chocolatey nupkg download url ###
#### This url should result in an immediate download when you navigate to it in
#### a web browser
$ChocolateyNupkgUrl = "INTERNAL REPO URL/package/chocolatey.1.1.0.nupkg",
### c. Internal Repository Credential ###
#### If required, add the repository access credential here
# $NugetRepositoryCredential = [PSCredential]::new(
# "username",
# ("password" | ConvertTo-SecureString -AsPlainText -Force)
# ),
### d. Install.ps1 URL
#### The path to the hosted install script:
$ChocolateyInstallPs1Url = "https://community.chocolatey.org/install.ps1"
### e. Chocolatey Central Management (CCM) ###
#### If using CCM to manage Chocolatey, add the following:
#### i. Endpoint URL for CCM
# $ChocolateyCentralManagementUrl = "https://chocolatey-central-management:24020/ChocolateyManagementService",
#### ii. If using a Client Salt, add it here
# $ChocolateyCentralManagementClientSalt = "clientsalt",
#### iii. If using a Service Salt, add it here
# $ChocolateyCentralManagementServiceSalt = "servicesalt"
)
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName cChoco
Node 'localhost' {
## 3. ENSURE CHOCOLATEY IS INSTALLED ##
### Ensure Chocolatey is installed from your internal repository
Environment chocoDownloadUrl {
Name = "chocolateyDownloadUrl"
Value = $ChocolateyNupkgUrl
}
cChocoInstaller installChocolatey {
DependsOn = "[Environment]chocoDownloadUrl"
InstallDir = Join-Path $env:ProgramData "chocolatey"
ChocoInstallScriptUrl = $ChocolateyInstallPs1Url
}
## 4. CONFIGURE CHOCOLATEY BASELINE ##
### a. FIPS Feature ###
#### If you need FIPS compliance - make this the first thing you configure
#### before you do any additional configuration or package installations
# cChocoFeature featureFipsCompliance {
# FeatureName = "useFipsCompliantChecksums"
# }
### b. Apply Recommended Configuration ###
#### Move cache location so Chocolatey is very deterministic about
#### cleaning up temporary data and the location is secured to admins
cChocoConfig cacheLocation {
DependsOn = "[cChocoInstaller]installChocolatey"
ConfigName = "cacheLocation"
Value = "C:\ProgramData\chocolatey\cache"
}
#### Increase timeout to at least 4 hours
cChocoConfig commandExecutionTimeoutSeconds {
DependsOn = "[cChocoInstaller]installChocolatey"
ConfigName = "commandExecutionTimeoutSeconds"
Value = 14400
}
#### Turn off download progress when running choco through integrations
cChocoFeature showDownloadProgress {
DependsOn = "[cChocoInstaller]installChocolatey"
FeatureName = "showDownloadProgress"
Ensure = "Absent"
}
### c. Sources ###
#### Remove the default community package repository source
cChocoSource removeCommunityRepository {
DependsOn = "[cChocoInstaller]installChocolatey"
Name = "chocolatey"
Ensure = "Absent"
}
#### Add internal default sources
#### You could have multiple sources here, so we will provide an example
#### of one using the remote repo variable here.
#### NOTE: This EXAMPLE may require changes
cChocoSource addInternalSource {
DependsOn = "[cChocoInstaller]installChocolatey"
Name = "ChocolateyInternal"
Source = $NugetRepositoryUrl
Credentials = $NugetRepositoryCredential
Priority = 1
}
### b. Keep Chocolatey Up To Date ###
#### 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/
cChocoPackageInstaller updateChocolatey {
DependsOn = "[cChocoSource]addInternalSource", "[cChocoSource]removeCommunityRepository"
Name = "chocolatey"
AutoUpgrade = $true
}
## 5. ENSURE CHOCOLATEY FOR BUSINESS ##
### If you don't have Chocolatey for Business (C4B), you'll want to remove from here down.
### a. Ensure The License File Is Installed ###
#### Create a license package using script from https://docs.chocolatey.org/en-us/how-tos/setup-offline-installation#exercise-4-create-a-package-for-the-license
cChocoPackageInstaller chocolateyLicense {
DependsOn = "[cChocoPackageInstaller]updateChocolatey"
Name = "chocolatey-license"
}
### b. Disable The Licensed Source ###
#### The licensed source cannot be removed, so it must be disabled.
#### This must occur after the license has been set by the license package.
Script disableLicensedSource {
DependsOn = "[cChocoPackageInstaller]chocolateyLicense"
GetScript = {
$Source = choco source list --limitoutput | `
ConvertFrom-Csv -Delimiter '|' -Header Name, Source, Disabled | `
Where-Object Name -eq "chocolatey.licensed"
return @{
Result = if ($Source) {
[bool]::Parse($Source.Disabled)
} else {
Write-Warning "Source 'chocolatey.licensed' was not present."
$true # Source does not need disabling
}
}
}
SetScript = {
$null = choco source disable --name "chocolatey.licensed"
}
TestScript = {
$State = [ScriptBlock]::Create($GetScript).Invoke()
return $State.Result
}
}
### c. Ensure Chocolatey Licensed Extension ###
#### You will have downloaded the licensed extension to your internal repository
#### as you have disabled the licensed repository in step 5b.
#### Ensure the chocolatey.extension package (aka Chocolatey Licensed Extension)
cChocoPackageInstaller chocolateyLicensedExtension {
DependsOn = "[Script]disableLicensedSource"
Name = "chocolatey.extension"
}
#### The Chocolatey Licensed Extension unlocks all of the following, which also have configuration/feature items available with them. You may want to visit the feature pages to see what you might want to also enable:
#### - Package Builder - https://docs.chocolatey.org/en-us/features/paid/package-builder
#### - Package Internalizer - https://docs.chocolatey.org/en-us/features/paid/package-internalizer
#### - Package Synchronization (3 components) - https://docs.chocolatey.org/en-us/features/paid/package-synchronization
#### - Package Reducer - https://docs.chocolatey.org/en-us/features/paid/package-reducer
#### - Package Audit - https://docs.chocolatey.org/en-us/features/paid/package-audit
#### - Package Throttle - https://docs.chocolatey.org/en-us/features/paid/package-throttle
#### - CDN Cache Access - https://docs.chocolatey.org/en-us/features/paid/private-cdn
#### - Branding - https://docs.chocolatey.org/en-us/features/paid/branding
#### - Self-Service Anywhere (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/self-service-anywhere
#### - Chocolatey Central Management (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/chocolatey-central-management
#### - Other - https://docs.chocolatey.org/en-us/features/paid/
### d. Ensure Self-Service Anywhere ###
#### If you have desktop clients where users are not administrators, you may
#### to take advantage of deploying and configuring Self-Service anywhere
cChocoFeature hideElevatedWarnings {
DependsOn = "[cChocoPackageInstaller]chocolateyLicensedExtension"
FeatureName = "showNonElevatedWarnings"
Ensure = "Absent"
}
cChocoFeature useBackgroundService {
DependsOn = "[cChocoPackageInstaller]chocolateyLicensedExtension"
FeatureName = "useBackgroundService"
Ensure = "Present"
}
cChocoFeature useBackgroundServiceWithNonAdmins {
DependsOn = "[cChocoPackageInstaller]chocolateyLicensedExtension"
FeatureName = "useBackgroundServiceWithNonAdministratorsOnly"
Ensure = "Present"
}
cChocoFeature useBackgroundServiceUninstallsForUserInstalls {
DependsOn = "[cChocoPackageInstaller]chocolateyLicensedExtension"
FeatureName = "allowBackgroundServiceUninstallsFromUserInstallsOnly"
Ensure = "Present"
}
cChocoConfig allowedBackgroundServiceCommands {
DependsOn = "[cChocoFeature]useBackgroundService"
ConfigName = "backgroundServiceAllowedCommands"
Value = "install,upgrade,uninstall"
}
### e. Ensure Chocolatey Central Management ###
#### If you want to manage and report on endpoints, you can set up and configure
### Central Management. There are multiple portions to manage, so you'll see
### a section on agents here along with notes on how to configure the server
### side components.
if ($ChocolateyCentralManagementUrl) {
cChocoPackageInstaller chocolateyAgent {
DependsOn = "[cChocoPackageInstaller]chocolateyLicensedExtension"
Name = "chocolatey-agent"
}
cChocoConfig centralManagementServiceUrl {
DependsOn = "[cChocoPackageInstaller]chocolateyAgent"
ConfigName = "CentralManagementServiceUrl"
Value = $ChocolateyCentralManagementUrl
}
if ($ChocolateyCentralManagementClientSalt) {
cChocoConfig centralManagementClientSalt {
DependsOn = "[cChocoPackageInstaller]chocolateyAgent"
ConfigName = "centralManagementClientCommunicationSaltAdditivePassword"
Value = $ChocolateyCentralManagementClientSalt
}
}
if ($ChocolateyCentralManagementServiceSalt) {
cChocoConfig centralManagementServiceSalt {
DependsOn = "[cChocoPackageInstaller]chocolateyAgent"
ConfigName = "centralManagementServiceCommunicationSaltAdditivePassword"
Value = $ChocolateyCentralManagementServiceSalt
}
}
cChocoFeature useCentralManagement {
DependsOn = "[cChocoPackageInstaller]chocolateyAgent"
FeatureName = "useChocolateyCentralManagement"
Ensure = "Present"
}
cChocoFeature useCentralManagementDeployments {
DependsOn = "[cChocoPackageInstaller]chocolateyAgent"
FeatureName = "useChocolateyCentralManagementDeployments"
Ensure = "Present"
}
}
}
}
# If working this into an existing configuration with a good method for
$ConfigData = @{
AllNodes = @(
@{
NodeName = "localhost"
PSDscAllowPlainTextPassword = $true
}
)
}
try {
Push-Location $env:Temp
$Config = ChocolateyConfig -ConfigurationData $ConfigData
Start-DscConfiguration -Path $Config.PSParentPath -Wait -Verbose -Force
} finally {
Pop-Location
}
Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.
If Applicable - Chocolatey Configuration/Installation
## 1. REQUIREMENTS ##
### Here are the requirements necessary to ensure this is successful.
### a. Internal/Private Cloud Repository Set Up ###
#### You'll need an internal/private cloud repository you can use. These are
#### generally really quick to set up and there are quite a few options.
#### Chocolatey Software recommends Nexus, Artifactory Pro, or ProGet as they
#### are repository servers and will give you the ability to manage multiple
#### repositories and types from one server installation.
### b. Download Chocolatey Package and Put on Internal Repository ###
#### You need to have downloaded the Chocolatey package as well.
#### Please see https://chocolatey.org/install#organization
### c. Other Requirements ###
#### i. Requires puppetlabs/chocolatey module
#### See https://forge.puppet.com/puppetlabs/chocolatey
## 2. TOP LEVEL VARIABLES ##
### a. Your internal repository url (the main one). ###
#### Should be similar to what you see when you browse
#### to https://community.chocolatey.org/api/v2/
$_repository_url = 'INTERNAL REPO URL'
### b. Chocolatey nupkg download url ###
#### This url should result in an immediate download when you navigate to it in
#### a web browser
$_choco_download_url = 'INTERNAL REPO URL/package/chocolatey.1.1.0.nupkg'
### c. Chocolatey Central Management (CCM) ###
#### If using CCM to manage Chocolatey, add the following:
#### i. Endpoint URL for CCM
# $_chocolatey_central_management_url = 'https://chocolatey-central-management:24020/ChocolateyManagementService'
#### ii. If using a Client Salt, add it here
# $_chocolatey_central_management_client_salt = "clientsalt"
#### iii. If using a Service Salt, add it here
# $_chocolatey_central_management_service_salt = 'servicesalt'
## 3. ENSURE CHOCOLATEY IS INSTALLED ##
### Ensure Chocolatey is installed from your internal repository
### 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 => $_choco_download_url,
use_7zip => false,
}
## 4. CONFIGURE CHOCOLATEY BASELINE ##
### a. FIPS Feature ###
#### 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,
#}
### b. Apply Recommended Configuration ###
#### Move cache location so Chocolatey is very deterministic about
#### cleaning up temporary data and the location is secured to admins
chocolateyconfig {'cacheLocation':
value => 'C:\ProgramData\chocolatey\cache',
}
#### Increase timeout to at least 4 hours
chocolateyconfig {'commandExecutionTimeoutSeconds':
value => '14400',
}
#### Turn off download progress when running choco through integrations
chocolateyfeature {'showDownloadProgress':
ensure => disabled,
}
### c. Sources ###
#### Remove the default community package repository source
chocolateysource {'chocolatey':
ensure => absent,
location => 'https://community.chocolatey.org/api/v2/',
}
#### Add internal default sources
#### You could have multiple sources here, so we will provide an example
#### of one using the remote repo variable here
#### NOTE: This EXAMPLE requires changes
chocolateysource {'internal_chocolatey':
ensure => present,
location => $_repository_url,
priority => 1,
username => 'optional',
password => 'optional,not ensured',
bypass_proxy => true,
admin_only => false,
allow_self_service => false,
}
### b. Keep Chocolatey Up To Date ###
#### 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 => $_repository_url,
}
## 5. ENSURE CHOCOLATEY FOR BUSINESS ##
### If you don't have Chocolatey for Business (C4B), you'll want to remove from here down.
### a. Ensure The License File Is Installed ###
#### Create a license package using script from https://docs.chocolatey.org/en-us/guides/organizations/organizational-deployment-guide#exercise-4-create-a-package-for-the-license
# TODO: Add resource for installing/ensuring the chocolatey-license package
package {'chocolatey-license':
ensure => latest,
provider => chocolatey,
source => $_repository_url,
}
### b. Disable The Licensed Source ###
#### The licensed source cannot be removed, so it must be disabled.
#### This must occur after the license has been set by the license package.
## Disabled sources still need all other attributes until
## https://tickets.puppetlabs.com/browse/MODULES-4449 is resolved.
## Password is necessary with user, but not ensurable, so it should not
## matter what it is set to here. If you ever do get into trouble here,
## the password is your license GUID.
chocolateysource {'chocolatey.licensed':
ensure => disabled,
priority => '10',
user => 'customer',
password => '1234',
require => Package['chocolatey-license'],
}
### c. Ensure Chocolatey Licensed Extension ###
#### You will have downloaded the licensed extension to your internal repository
#### as you have disabled the licensed repository in step 5b.
#### Ensure the chocolatey.extension package (aka Chocolatey Licensed Extension)
package {'chocolatey.extension':
ensure => latest,
provider => chocolatey,
source => $_repository_url,
require => Package['chocolatey-license'],
}
#### The Chocolatey Licensed Extension unlocks all of the following, which also have configuration/feature items available with them. You may want to visit the feature pages to see what you might want to also enable:
#### - Package Builder - https://docs.chocolatey.org/en-us/features/paid/package-builder
#### - Package Internalizer - https://docs.chocolatey.org/en-us/features/paid/package-internalizer
#### - Package Synchronization (3 components) - https://docs.chocolatey.org/en-us/features/paid/package-synchronization
#### - Package Reducer - https://docs.chocolatey.org/en-us/features/paid/package-reducer
#### - Package Audit - https://docs.chocolatey.org/en-us/features/paid/package-audit
#### - Package Throttle - https://docs.chocolatey.org/en-us/features/paid/package-throttle
#### - CDN Cache Access - https://docs.chocolatey.org/en-us/features/paid/private-cdn
#### - Branding - https://docs.chocolatey.org/en-us/features/paid/branding
#### - Self-Service Anywhere (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/self-service-anywhere
#### - Chocolatey Central Management (more components will need to be installed and additional configuration will need to be set) - https://docs.chocolatey.org/en-us/features/paid/chocolatey-central-management
#### - Other - https://docs.chocolatey.org/en-us/features/paid/
### d. Ensure Self-Service Anywhere ###
#### If you have desktop clients where users are not administrators, you may
#### to take advantage of deploying and configuring Self-Service anywhere
chocolateyfeature {'showNonElevatedWarnings':
ensure => disabled,
}
chocolateyfeature {'useBackgroundService':
ensure => enabled,
}
chocolateyfeature {'useBackgroundServiceWithNonAdministratorsOnly':
ensure => enabled,
}
chocolateyfeature {'allowBackgroundServiceUninstallsFromUserInstallsOnly':
ensure => enabled,
}
chocolateyconfig {'backgroundServiceAllowedCommands':
value => 'install,upgrade,uninstall',
}
### e. Ensure Chocolatey Central Management ###
#### If you want to manage and report on endpoints, you can set up and configure
### Central Management. There are multiple portions to manage, so you'll see
### a section on agents here along with notes on how to configure the server
### side components.
if $_chocolatey_central_management_url {
package {'chocolatey-agent':
ensure => latest,
provider => chocolatey,
source => $_repository_url,
require => Package['chocolatey-license'],
}
chocolateyconfig {'CentralManagementServiceUrl':
value => $_chocolatey_central_management_url,
}
if $_chocolatey_central_management_client_salt {
chocolateyconfig {'centralManagementClientCommunicationSaltAdditivePassword':
value => $_chocolatey_central_management_client_salt,
}
}
if $_chocolatey_central_management_service_salt {
chocolateyconfig {'centralManagementClientCommunicationSaltAdditivePassword':
value => $_chocolatey_central_management_client_salt,
}
}
chocolateyfeature {'useChocolateyCentralManagement':
ensure => enabled,
require => Package['chocolatey-agent'],
}
chocolateyfeature {'useChocolateyCentralManagementDeployments':
ensure => enabled,
require => Package['chocolatey-agent'],
}
}
Need Help? View our docs or file an issue.
There is already a version of this package in your Script Builder
Current Version | New Version |
---|---|
- Passing
- Failing
- Pending
- Unknown / Exempted

Downloads:
805,443
Downloads of v 2.9.24:
706
Last Update:
18 Jun 2017
Package Maintainer(s):
Software Author(s):
- Matt Wrock
Tags:
devops bootstraper setup windows customizations- Software Specific:
- Software Site
- Software License
- Package Specific:
- Possible Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download

Boxstarter WinConfig Module
This is not the latest version of Boxstarter WinConfig Module available.
- 1
- 2
- 3
2.9.24 | Updated: 18 Jun 2017
- Software Specific:
- Software Site
- Software License
- Package Specific:
- Possible Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
805,443
Downloads of v 2.9.24:
706
Software Author(s):
- Matt Wrock
Edit Package
To edit the metadata for a package, please upload an updated version of the package.
Chocolatey's Community Package Repository currently does not allow updating package metadata on the website. This helps ensure that the package itself (and the source used to build the package) remains the one true source of package metadata.
This does require that you increment the package version.
- 1
- 2
- 3
Boxstarter WinConfig Module
2.9.24
This is not the latest version of Boxstarter WinConfig Module available.
- 1
- 2
- 3
All Checks are Passing
3 Passing Tests
Deployment Method: Individual Install, Upgrade, & Uninstall
To install Boxstarter WinConfig Module, run the following command from the command line or from PowerShell:
To upgrade Boxstarter WinConfig Module, run the following command from the command line or from PowerShell:
To uninstall Boxstarter WinConfig Module, run the following command from the command line or from PowerShell:
Deployment Method:
📝 NOTE: This applies to both open source and commercial editions of Chocolatey.
1. Enter Your Internal Repository Url
(this should look similar to https://community.chocolatey.org/api/v2/)
2. Setup Your Environment
1. Ensure you are set for organizational deployment
Please see the organizational deployment guide
2. Get the package into your environment
Option 1: Cached Package (Unreliable, Requires Internet - Same As Community)-
Open Source or Commercial:
- Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
- You can also just download the package and push it to a repository Download
-
Open Source
-
Download the package:
Download - Follow manual internalization instructions
-
-
Package Internalizer (C4B)
-
Run: (additional options)
choco download boxstarter.winconfig --internalize --version=2.9.24 --source=https://community.chocolatey.org/api/v2/
-
For package and dependencies run:
choco push --source="'INTERNAL REPO URL'"
- Automate package internalization
-
Run: (additional options)
3. Copy Your Script
choco upgrade boxstarter.winconfig -y --source="'INTERNAL REPO URL'" --version="'2.9.24'" [other options]
See options you can pass to upgrade.
See best practices for scripting.
Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.
If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:
choco upgrade boxstarter.winconfig -y --source="'INTERNAL REPO URL'" --version="'2.9.24'"
$exitCode = $LASTEXITCODE
Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
Exit 0
}
Exit $exitCode
- name: Install boxstarter.winconfig
win_chocolatey:
name: boxstarter.winconfig
version: '2.9.24'
source: INTERNAL REPO URL
state: present
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
chocolatey_package 'boxstarter.winconfig' do
action :install
source 'INTERNAL REPO URL'
version '2.9.24'
end
See docs at https://docs.chef.io/resource_chocolatey_package.html.
cChocoPackageInstaller boxstarter.winconfig
{
Name = "boxstarter.winconfig"
Version = "2.9.24"
Source = "INTERNAL REPO URL"
}
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
package { 'boxstarter.winconfig':
ensure => '2.9.24',
provider => 'chocolatey',
source => 'INTERNAL REPO URL',
}
Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.
4. If applicable - Chocolatey configuration/installation
See infrastructure management matrix for Chocolatey configuration elements and examples.
This package was approved as a trusted package on 18 Jun 2017.
Functions that Boxstarter uses to customize the windows environment.
@{
Description = 'Provides Functions for customizing and configuring core windows settings'
# Script module or binary module file associated with this manifest.
ModuleToProcess = './boxstarter.WinConfig.psm1'
# Version number of this module.
ModuleVersion = '2.9.24'
# ID used to uniquely identify this module
GUID = 'bbdb3e8b-9daf-4c00-a553-4f3f88fb6e52'
# Author of this module
Author = 'Matt Wrock'
# Copyright statement for this module
Copyright = '(c) 2017 Matt Wrock.'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '2.0'
# Minimum version of the .NET Framework required by this module
DotNetFrameworkVersion = '2.0'
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @('..\Boxstarter.Common\Boxstarter.Common.psd1')
# Functions to export from this module
FunctionsToExport = '*'
# Cmdlets to export from this module
CmdletsToExport = '*'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module
AliasesToExport = '*'
# List of all modules packaged with this module.
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess
PrivateData = '69e2cbcd24b8f2435b1425154ded5d1e8f0d6b49'
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
Resolve-Path $PSScriptRoot\*.ps1 |
% { . $_.ProviderPath }
Export-ModuleMember Disable-UAC, Enable-UAC, Get-UAC, Disable-InternetExplorerESC, Disable-GameBarTips, Get-ExplorerOptions, Set-TaskbarSmall, Install-WindowsUpdate, Move-LibraryDirectory, Enable-RemoteDesktop, Set-ExplorerOptions, Get-LibraryNames, Update-ExecutionPolicy, Enable-MicrosoftUpdate, Disable-MicrosoftUpdate, Set-StartScreenOptions, Set-CornerNavigationOptions, Set-WindowsExplorerOptions, Set-TaskbarOptions, Disable-BingSearch
function Disable-BingSearch {
<#
.SYNOPSIS
Disables the Bing Internet Search when searching from the search field in the Taskbar or Start Menu.
.LINK
http://boxstarter.org
https://www.privateinternetaccess.com/forum/discussion/18301/how-to-uninstall-core-apps-in-windows-10-and-miscellaneous
#>
$path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search"
if(!(Test-Path $path)) {
New-Item $path
}
New-ItemProperty -LiteralPath $path -Name "BingSearchEnabled" -Value 0 -PropertyType "DWord" -ErrorAction SilentlyContinue
Set-ItemProperty -LiteralPath $path -Name "BingSearchEnabled" -Value 0
}
function Disable-GameBarTips {
<#
.SYNOPSIS
Turns off the tips displayed by the XBox GameBar
.LINK
http://boxstarter.org
#>
$path = "HKCU:\SOFTWARE\Microsoft\GameBar"
if(!(Test-Path $path)) {
New-Item $path
}
New-ItemProperty -LiteralPath $path -Name "ShowStartupPanel" -Value 0 -PropertyType "DWord" -ErrorAction SilentlyContinue
Set-ItemProperty -LiteralPath $path -Name "ShowStartupPanel" -Value 0
Write-Output "GameBar Tips have been disabled."
}
function Disable-InternetExplorerESC {
<#
.SYNOPSIS
Turns off IE Enhanced Security Configuration that is on by default on Server OS versions
.LINK
http://boxstarter.org
#>
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
if(Test-Path $AdminKey){
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0
$disabled = $true
}
if(Test-Path $UserKey) {
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0
$disabled = $true
}
if($disabled) {
Restart-Explorer
Write-Output "IE Enhanced Security Configuration (ESC) has been disabled."
}
}
function Disable-MicrosoftUpdate {
<#
.SYNOPSIS
Turns off Microsoft Update, so additional updates for other Microsoft products, installed on the system, will not be included when running Windows Update.
.LINK
http://boxstarter.org
Enable-MicrosoftUpdate
#>
if(Get-IsMicrosoftUpdateEnabled) {
Write-BoxstarterMessage "Microsoft Update is currently enabled."
Write-BoxstarterMessage "Disabling Microsoft Update..."
# Making modifications to removed an established Service, when being executed from a remote session, needs elevated permissions.
# As a result, a call to invoke a scheduled task to execute the work will be used, otherwise execute normally.
if(Get-IsRemote){
Invoke-FromTask @"
`$serviceManager = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
`$serviceManager.ClientApplicationID = "Boxstarter"
`$serviceManager.RemoveService("7971f918-a847-4430-9279-4a52d1efe18d")
"@
}
else{
$serviceManager = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
$serviceManager.ClientApplicationID = "Boxstarter"
$serviceManager.RemoveService("7971f918-a847-4430-9279-4a52d1efe18d")
}
}
else {
Write-BoxstarterMessage "Microsoft Update is already disabled, no action will be taken."
}
}
function Disable-UAC {
<#
.SYNOPSIS
Turns off Windows User Access Control
.LINK
http://boxstarter.org
Enable-UAC
#>
Write-BoxstarterMessage "Disabling UAC"
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 0
}
function Enable-MicrosoftUpdate {
<#
.SYNOPSIS
Turns on Microsoft Update, so additional updates for other Microsoft products, installed on the system, will be included when running Windows Update.
.LINK
http://boxstarter.org
Disable-MicrsoftUpdate
#>
if(!(Get-IsMicrosoftUpdateEnabled)) {
Write-BoxstarterMessage "Microsoft Update is currently disabled."
Write-BoxstarterMessage "Enabling Microsoft Update..."
$serviceManager = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
$serviceManager.ClientApplicationID = "Boxstarter"
$serviceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
}
else {
Write-BoxstarterMessage "Microsoft Update is already enabled, no action will be taken."
}
}
function Enable-RemoteDesktop {
<#
.SYNOPSIS
Allows Remote Desktop access to machine and enables Remote Desktop firewall rule
.PARAMETER DoNotRequireUserLevelAuthentication
Allows connections from computers running remote desktop
without Network Level Authentication (not recommended)
.LINK
http://boxstarter.org
#>
param(
[switch]$DoNotRequireUserLevelAuthentication
)
Write-BoxstarterMessage "Enabling Remote Desktop..."
$obj = Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace root\cimv2\terminalservices
if($obj -eq $null) {
Write-BoxstarterMessage "Unable to locate terminalservices namespace. Remote Desktop is not enabled"
return
}
try {
$obj.SetAllowTsConnections(1,1) | out-null
}
catch {
throw "There was a problem enabling remote desktop. Make sure your operating system supports remote desktop and there is no group policy preventing you from enabling it."
}
$obj2 = Get-WmiObject -class Win32_TSGeneralSetting -Namespace root\cimv2\terminalservices -ComputerName . -Filter "TerminalName='RDP-tcp'"
if($obj2.UserAuthenticationRequired -eq $null) {
Write-BoxstarterMessage "Unable to locate Remote Desktop NLA namespace. Remote Desktop NLA is not enabled"
return
}
try {
if($DoNotRequireUserLevelAuthentication) {
$obj2.SetUserAuthenticationRequired(0) | out-null
Write-BoxstarterMessage "Disabling Remote Desktop NLA ..."
}
else {
$obj2.SetUserAuthenticationRequired(1) | out-null
Write-BoxstarterMessage "Enabling Remote Desktop NLA ..."
}
}
catch {
throw "There was a problem enabling Remote Desktop NLA. Make sure your operating system supports Remote Desktop NLA and there is no group policy preventing you from enabling it."
}
}
function Enable-UAC {
<#
.SYNOPSIS
Turns on Windows User Access Control
.LINK
http://boxstarter.org
#>
Write-BoxstarterMessage "Enabling UAC"
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 1
}
function Get-LibraryNames {
<#
.SYNOPSIS
Lists all Windows Library folders (My Pictures, personal, downloads, etc)
.DESCRIPTION
Libraries are special folders that map to a specific location on disk. These are usually found somewhere under $env:userprofile. This function can be used to discover the existing libraries and then use Move-LibraryDirectory to move the path of a library if desired.
.LINK
http://boxstarter.org
Move-LibraryDirectory
#>
$shells = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
$retVal = @()
(Get-Item $shells).Property | % {
$property = ( Get-ItemProperty -Path $shells -Name $_ )
$retVal += @{ "$_"=$property."$_" }
}
return $retVal
}
<#A Build step copies this function to bootstrapper Directory. Only edit script in Helpers#>
function Get-UAC {
<#
.SYNOPSIS
Checks if User Access Control is turned on
.LINK
http://boxstarter.org
#>
$uac=Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA
return $uac.EnableLUA -eq 1
}
function Install-WindowsUpdate {
<#
.SYNOPSIS
Downloads and installs updates via Windows Update
.DESCRIPTION
This uses the windows update service to search, download and install updates. By default, only critical updates are included and a reboot will be induced if required.
.PARAMETER GetUpdatesFromMS
If this switch is set, the default windows update server, if any, is bypassed and windows update requests go to the public Microsoft Windows update service.
.PARAMETER AcceptEula
If any update requires a Eula acceptance, setting this switch will accept the Eula and allow the update to be installed.
.PARAMETER SuppressReboots
Setting this switch will suppress a reboot in the event that any update requires one.
.PARAMETER Criteria
The criteria used for searching updates. The default criteria is "IsHidden=0 and IsInstalled=0 and Type='Software'" which is effectively just critical updates.
.LINK
http://boxstarter.org
#>
param(
[switch]$getUpdatesFromMS,
[switch]$acceptEula,
[switch]$SuppressReboots,
[string]$criteria="IsHidden=0 and IsInstalled=0 and Type='Software' and BrowseOnly=0"
)
if(Get-IsRemote){
Invoke-FromTask @"
Import-Module $($boxstarter.BaseDir)\boxstarter.WinConfig\Boxstarter.Winconfig.psd1
Install-WindowsUpdate -GetUpdatesFromMS:`$$GetUpdatesFromMS -AcceptEula:`$$AcceptEula -SuppressReboots -Criteria "$Criteria"
"@ -IdleTimeout 0 -TotalTimeout 0
if(Test-PendingReboot){
Invoke-Reboot
}
return
}
try{
$searchSession=Start-TimedSection "Checking for updates..."
$updateSession =new-object -comobject "Microsoft.Update.Session"
$Downloader =$updateSession.CreateUpdateDownloader()
$Installer =$updateSession.CreateUpdateInstaller()
$Searcher =$updatesession.CreateUpdateSearcher()
if($getUpdatesFromMS) {
$Searcher.ServerSelection = 2 #2 is the Const for the Windows Update server
}
$wus=Get-WmiObject -Class Win32_Service -Filter "Name='wuauserv'"
$origStatus=$wus.State
$origStartupType=$wus.StartMode
Write-BoxstarterMessage "Update service is in the $origStatus state and its startup type is $origStartupType" -verbose
if($origStartupType -eq "Auto"){
$origStartupType = "Automatic"
}
if($origStatus -eq "Stopped"){
if($origStartupType -eq "Disabled"){
Set-Service wuauserv -StartupType Automatic
}
Out-BoxstarterLog "Starting windows update service" -verbose
Start-Service -Name wuauserv
}
else {
# Restart in case updates are running in the background
Out-BoxstarterLog "Restarting windows update service" -verbose
Remove-BoxstarterError { Restart-Service -Name wuauserv -Force -WarningAction SilentlyContinue }
}
$Result = $Searcher.Search($criteria)
Stop-TimedSection $searchSession
$totalUpdates = $Result.updates.count
If ($totalUpdates -ne 0)
{
Out-BoxstarterLog "$($Result.updates.count) Updates found"
$currentCount = 0
foreach($update in $result.updates) {
++$currentCount
if(!($update.EulaAccepted)){
if($acceptEula) {
$update.AcceptEula()
}
else {
Out-BoxstarterLog " * $($update.title) has a user agreement that must be accepted. Call Install-WindowsUpdate with the -AcceptEula parameter to accept all user agreements. This update will be ignored."
continue
}
}
$Result= $null
if ($update.isDownloaded -eq "true" -and ($update.InstallationBehavior.CanRequestUserInput -eq $false )) {
Out-BoxstarterLog " * $($update.title) already downloaded"
$result = install-Update $update $currentCount $totalUpdates
}
elseif($update.InstallationBehavior.CanRequestUserInput -eq $true) {
Out-BoxstarterLog " * $($update.title) Requires user input and will not be downloaded"
}
else {
Download-Update $update
$result = Install-Update $update $currentCount $totalUpdates
}
}
if($result -ne $null -and $result.rebootRequired) {
if($SuppressReboots) {
Out-BoxstarterLog "A Restart is Required."
} else {
$Rebooting=$true
Out-BoxstarterLog "Restart Required. Restarting now..."
Stop-TimedSection $installSession
if(test-path function:\Invoke-Reboot) {
return Invoke-Reboot
} else {
Restart-Computer -force
}
}
}
}
else{Out-BoxstarterLog "There is no update applicable to this machine"}
}
catch {
Out-BoxstarterLog "There were problems installing updates: $($_.ToString())"
throw
}
finally {
if($origAUVal){
Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWuServer -Value $origAUVal -ErrorAction SilentlyContinue
}
if($origStatus -eq "Stopped")
{
Out-BoxstarterLog "Stopping win update service and setting its startup type to $origStartupType" -verbose
Set-Service wuauserv -StartupType $origStartupType
Remove-BoxstarterError { stop-service wuauserv -WarningAction SilentlyContinue }
}
}
}
function Download-Update($update) {
$downloadSession=Start-TimedSection "Download of $($update.Title)"
$updates= new-Object -com "Microsoft.Update.UpdateColl"
$updates.Add($update) | out-null
$Downloader.Updates = $updates
$Downloader.Download() | Out-Null
Stop-TimedSection $downloadSession
}
function Install-Update($update, $currentCount, $totalUpdates) {
$installSession=Start-TimedSection "Install $currentCount of $totalUpdates updates: $($update.Title)"
$updates= new-Object -com "Microsoft.Update.UpdateColl"
$updates.Add($update) | out-null
$Installer.updates = $Updates
try { $result = $Installer.Install() } catch {
if(!($SuppressReboots) -and (test-path function:\Invoke-Reboot)){
if(Test-PendingReboot){
$global:error.RemoveAt(0)
Invoke-Reboot
}
}
# Check for WU_E_INSTALL_NOT_ALLOWED
if($_.Exception.HResult -eq -2146233087) {
Out-BoxstarterLog "There is either an update in progress or there is a pending reboot blocking the install."
$global:error.RemoveAt(0)
}
else { throw }
}
Stop-TimedSection $installSession
return $result
}
function Move-LibraryDirectory {
<#
.SYNOPSIS
Moves a Windows Library folder (My Pictures, personal, downloads, etc) to the given path
.DESCRIPTION
Libraries are special folders that map to a specific location on disk. These are usually found somewhere under $env:userprofile. This function can be used to redirect the library folder to a new location on disk. If the new location does not already exist, the directory will be created. Any content in the former library directory will be moved to the new location unless the DoNotMoveOldContent switch is used. Use Get-LibraryNames to discover the names of different libraries and their current physical directories.
.PARAMETER libraryName
The name of the library to move
.PARAMETER newPath
The path to move the library to. If the path does not exist, it will be created.
.PARAMETER DoNotMoveOldContent
If this switch is used, any content in the current physical directory that the library points to will not be moved to the new path.
.EXAMPLE
Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents"
This moves the Personal library (aka Documents) to the documents folder off of the default skydrive directory.
.LINK
http://boxstarter.org
Get-LibraryNames
#>
param(
[Parameter(Mandatory=$true)]
[string]$libraryName,
[Parameter(Mandatory=$true)]
[string]$newPath,
[switch]$DoNotMoveOldContent
)
#why name the key downloads when you can name it {374DE290-123F-4565-9164-39C4925E467B}? duh.
if($libraryName.ToLower() -eq "downloads") {$libraryName="{374DE290-123F-4565-9164-39C4925E467B}"}
$shells = (Get-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders')
if(-not ($shells.Property -Contains $libraryName)) {
throw "$libraryName is not a valid Library"
}
$oldPath = (Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' -name "$libraryName")."$libraryName"
if(-not (test-path "$newPath")){
New-Item $newPath -type directory
}
if((resolve-path $oldPath).Path -eq (resolve-path $newPath).Path) {return}
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' $libraryName $newPath
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' $libraryName $newPath
Restart-Explorer
if(!$DoNotMoveOldContent) { Move-Item -Force $oldPath/* $newPath -ErrorAction SilentlyContinue}
}
function Restart-Explorer {
try{
Write-BoxstarterMessage "Restarting the Windows Explorer process..."
$user = Get-CurrentUser
try { $explorer = Get-Process -Name explorer -ErrorAction stop -IncludeUserName }
catch {$global:error.RemoveAt(0)}
if($explorer -ne $null) {
$explorer | ? { $_.UserName -eq "$($user.Domain)\$($user.Name)"} | Stop-Process -Force -ErrorAction Stop | Out-Null
}
Start-Sleep 1
if(!(Get-Process -Name explorer -ErrorAction SilentlyContinue)) {
$global:error.RemoveAt(0)
start-Process -FilePath explorer
}
} catch {$global:error.RemoveAt(0)}
}
function Set-CornerNavigationOptions {
<#
.SYNOPSIS
Sets options for the Windows Corner Navigation
.PARAMETER EnableUpperRightCornerShowCharms
When I point to the upper-right corner, show the charms
.PARAMETER DisableUpperRightCornerShowCharms
Disables the showing of charms when pointing to the upper right corner, see EnableUpperRightCornerShowCharms
.PARAMETER EnableUpperLeftCornerSwitchApps
When I click the upper-left corner, switch between my recent apps
.PARAMETER DisableUpperLeftCornerSwitchApps
Disables the switching between recent apps, when clicking in the upper-left corner, see EnableUpperLeftCornerSwitchApps
.PARAMETER EnableUsePowerShellOnWinX
Replace Command Prompt with Windows PowerShell in the menu when I right-click the lower-left corner or press Windows key+X
.PARAMETER DisableUsePowerShellOnWinX
Disables the showing of Windows PowerShell in the lower-left corner, see EnableUsePowerShellOnWinX
#>
[CmdletBinding()]
param(
[switch]$EnableUpperRightCornerShowCharms,
[switch]$DisableUpperRightCornerShowCharms,
[switch]$EnableUpperLeftCornerSwitchApps,
[switch]$DisableUpperLeftCornerSwitchApps,
[switch]$EnableUsePowerShellOnWinX,
[switch]$DisableUsePowerShellOnWinX
)
$PSBoundParameters.Keys | % {
if($_-like "En*"){ $other="Dis" + $_.Substring(2)}
if($_-like "Dis*"){ $other="En" + $_.Substring(3)}
if($PSBoundParameters[$_] -and $PSBoundParameters[$other]) {
throw new-Object -TypeName ArgumentException "You may not set both $_ and $other. You can only set one."
}
}
$edgeUIKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\EdgeUi'
$advancedKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
if(Test-Path -Path $edgeUIKey) {
if($EnableUpperRightCornerShowCharms) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTRCorner' -Value 0 }
if($DisableUpperRightCornerShowCharms) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTRCorner' -Value 1 }
if($EnableUpperLeftCornerSwitchApps) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTLCorner' -Value 0 }
if($DisableUpperLeftCornerSwitchApps) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTLCorner' -Value 1 }
}
if(Test-Path -Path $advancedKey) {
if($EnableUsePowerShellOnWinX) { Set-ItemProperty -Path $advancedKey -Name 'DontUsePowerShellOnWinX' -Value 0 }
if($DisableUsePowerShellOnWinX) { Set-ItemProperty -Path $advancedKey -Name 'DontUsePowerShellOnWinX' -Value 1 }
}
}
function Set-ExplorerOptions {
<#
.SYNOPSIS
Sets options on the windows Explorer shell
.PARAMETER showHiddenFilesFoldersDrives
If this switch is set, hidden files will be shown in windows explorer
.PARAMETER showProtectedOSFiles
If this flag is set, hidden Operating System files will be shown in windows explorer
.PARAMETER showFileExtensions
Setting this switch will cause windows explorer to include the file extension in file names
.LINK
http://boxstarter.org
#>
param(
[alias("showHidenFilesFoldersDrives")]
[switch]$showHiddenFilesFoldersDrives,
[switch]$showProtectedOSFiles,
[switch]$showFileExtensions
)
Write-Warning "This command is deprecated, use Set-WindowsExplorerOptions instead."
Write-Warning "Your call to this function will now be routed to the Set-WindowsExplorerOptions function."
if($showHiddenFilesFoldersDrives) { Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives }
if($showFileExtensions) { Set-WindowsExplorerOptions -EnableShowFileExtensions }
if($showProtectedOSFiles) { Set-WindowsExplorerOptions -EnableShowProtectedOSFiles }
}
function Set-StartScreenOptions {
<#
.SYNOPSIS
Sets options for the Windows Start Screen.
.PARAMETER EnableBootToDesktop
When I sign in or close all apps on a screen, go to the desktop instead of Start
.PARAMETER DisableBootToDesktop
Disables the Boot to Desktop Option, see enableBootToDesktop
.PARAMETER EnableDesktopBackgroundOnStart
Show Desktop background on Start
.PARAMETER DisableDesktopBackgroundOnStart
Do not show Desktop background on Start
.PARAMETER EnableShowStartOnActiveScreen
Show Start on the display I'm using when I press the Windows logo key
.PARAMETER DisableShowStartOnActiveScreen
Disables the displaying of the Start screen on active screen, see enableShowStartOnActiveScreen
.PARAMETER EnableShowAppsViewOnStartScreen
Show the Apps view automatically when I go to Start
.PARAMETER DisableShowAppsViewOnStartScreen
Disables the showing of Apps View when Start is activated, see enableShowAppsViewOnStartScreen
.PARAMETER EnableSearchEverywhereInAppsView
Search everywhere instead of just my apps when I search from the Apps View
.PARAMETER DisableSearchEverywhereInAppsView
Disables the searching of everywhere instead of just apps, see enableSearchEverywhereInAppsView
.PARAMETER EnableListDesktopAppsFirst
List desktop apps first in the Apps view when it's sorted by category
.PARAMETER DisableListDesktopAppsFirst
Disables the ability to list desktop apps first when sorted by category, see enableListDesktopAppsFirst
.LINK
http://boxstarter.org
#>
[CmdletBinding()]
param(
[switch]$EnableBootToDesktop,
[switch]$DisableBootToDesktop,
[switch]$EnableDesktopBackgroundOnStart,
[switch]$DisableDesktopBackgroundOnStart,
[switch]$EnableShowStartOnActiveScreen,
[switch]$DisableShowStartOnActiveScreen,
[switch]$EnableShowAppsViewOnStartScreen,
[switch]$DisableShowAppsViewOnStartScreen,
[switch]$EnableSearchEverywhereInAppsView,
[switch]$DisableSearchEverywhereInAppsView,
[switch]$EnableListDesktopAppsFirst,
[switch]$DisableListDesktopAppsFirst
)
$PSBoundParameters.Keys | %{
if($_-like "En*"){ $other="Dis" + $_.Substring(2)}
if($_-like "Dis*"){ $other="En" + $_.Substring(3)}
if($PSBoundParameters[$_] -and $PSBoundParameters[$other]){
throw new-Object -TypeName ArgumentException "You may not set both $_ and $other. You can only set one."
}
}
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer'
$startPageKey = "$key\StartPage"
$accentKey = "$key\Accent"
if(Test-Path -Path $startPageKey) {
if($enableBootToDesktop) { Set-ItemProperty -Path $startPageKey -Name 'OpenAtLogon' -Value 0 }
if($disableBootToDesktop) { Set-ItemProperty -Path $startPageKey -Name 'OpenAtLogon' -Value 1 }
if($enableShowStartOnActiveScreen) { Set-ItemProperty -Path $startPageKey -Name 'MonitorOverride' -Value 1 }
if($disableShowStartOnActiveScreen) { Set-ItemProperty -Path $startPageKey -Name 'MonitorOverride' -Value 0 }
if($enableShowAppsViewOnStartScreen) { Set-ItemProperty -Path $startPageKey -Name 'MakeAllAppsDefault' -Value 1 }
if($disableShowAppsViewOnStartScreen) { Set-ItemProperty -Path $startPageKey -Name 'MakeAllAppsDefault' -Value 0 }
if($enableSearchEverywhereInAppsView) { Set-ItemProperty -Path $startPageKey -Name 'GlobalSearchInApps' -Value 1 }
if($disableSearchEverywhereInAppsView) { Set-ItemProperty -Path $startPageKey -Name 'GlobalSearchInApps' -Value 0 }
if($enableListDesktopAppsFirst) { Set-ItemProperty -Path $startPageKey -Name 'DesktopFirst' -Value 1 }
if($disableListDesktopAppsFirst) { Set-ItemProperty -Path $startPageKey -Name 'DesktopFirst' -Value 0 }
}
if(Test-Path -Path $accentKey) {
if($EnableDesktopBackgroundOnStart) { Set-ItemProperty -Path $accentKey -Name 'MotionAccentId_v1.00' -Value 219 }
if($DisableDesktopBackgroundOnStart) { Set-ItemProperty -Path $accentKey -Name 'MotionAccentId_v1.00' -Value 221 }
}
}
function Set-TaskbarOptions {
<#
.SYNOPSIS
Sets options for the Windows Task Bar
.PARAMETER Lock
Locks the taskbar
.PARAMETER UnLock
Unlocks the taskbar
.PARAMETER Size
Changes the size of the Taskbar Icons. Valid inputs are Small and Large.
.PARAMETER Dock
Changes the location in which the Taskbar is docked. Valid inputs are Top, Left, Bottom and Right.
.PARAMETER Combine
Changes the Taskbar Icon combination style. Valid inputs are Always, Full, and Never.
.PARAMETER AlwaysShowIconsOn
Turn on always show all icons in the notification area
.PARAMETER AlwaysShowIconsOff
Turn off always show all icons in the notification area
#>
[CmdletBinding(DefaultParameterSetName='unlock')]
param(
[Parameter(ParameterSetName='lock')]
[switch]$Lock,
[Parameter(ParameterSetName='unlock')]
[switch]$UnLock,
[Parameter(ParameterSetName='AlwaysShowIconsOn')]
[switch]$AlwaysShowIconsOn,
[Parameter(ParameterSetName='AlwaysShowIconsOff')]
[switch]$AlwaysShowIconsOff,
[ValidateSet('Small','Large')]
$Size,
[ValidateSet('Top','Left','Bottom','Right')]
$Dock,
[ValidateSet('Always','Full','Never')]
$Combine
)
$explorerKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer'
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
$dockingKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2'
if(-not (Test-Path -Path $dockingKey)) {
$dockingKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'
}
if(Test-Path -Path $key) {
if($Lock)
{
Set-ItemProperty $key TaskbarSizeMove 0
}
if($UnLock){
Set-ItemProperty $key TaskbarSizeMove 1
}
switch ($Size) {
"Small" { Set-ItemProperty $key TaskbarSmallIcons 1 }
"Large" { Set-ItemProperty $key TaskbarSmallIcons 0 }
}
switch($Combine) {
"Always" { Set-ItemProperty $key TaskbarGlomLevel 0 }
"Full" { Set-ItemProperty $key TaskbarGlomLevel 1 }
"Never" { Set-ItemProperty $key TaskbarGlomLevel 2 }
}
Restart-Explorer
}
if(Test-Path -Path $dockingKey) {
switch ($Dock) {
"Top" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x2e,0x00,0x00,0x00)) }
"Left" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0xb0,0x04,0x00,0x00)) }
"Bottom" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x04,0x00,0x00,0x80,0x07,0x00,0x00,0xb0,0x04,0x00,0x00)) }
"Right" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x42,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0xb0,0x04,0x00,0x00)) }
}
Restart-Explorer
}
if(Test-Path -Path $explorerKey) {
if($AlwaysShowIconsOn) { Set-ItemProperty -Path $explorerKey -Name 'EnableAutoTray' -Value 0 }
if($alwaysShowIconsOff) { Set-ItemProperty -Path $explorerKey -Name 'EnableAutoTray' -Value 1 }
}
}
function Set-TaskbarSmall {
<#
.SYNOPSIS
Makes the windows task bar skinny
#>
Write-Warning "This command is deprecated, use Set-TaskbarOptions instead."
Write-Warning "Your call to this function will now be routed to the Set-TaskbarOptions function."
Set-TaskbarOptions -Size Small
}
function Set-WindowsExplorerOptions {
<#
.SYNOPSIS
Sets options on the Windows Explorer shell
.PARAMETER EnableShowHiddenFilesFoldersDrives
If this flag is set, hidden files will be shown in Windows Explorer
.PARAMETER DisableShowHiddenFilesFoldersDrives
Disables the showing on hidden files in Windows Explorer, see EnableShowHiddenFilesFoldersDrives
.PARAMETER EnableShowProtectedOSFiles
If this flag is set, hidden Operating System files will be shown in Windows Explorer
.PARAMETER DisableShowProtectedOSFiles
Disables the showing of hidden Operating System Files in Windows Explorer, see EnableShowProtectedOSFiles
.PARAMETER EnableShowFileExtensions
Setting this switch will cause Windows Explorer to include the file extension in file names
.PARAMETER DisableShowFileExtensions
Disables the showing of file extension in file names, see EnableShowFileExtensions
.PARAMETER EnableShowFullPathInTitleBar
Setting this switch will cause Windows Explorer to show the full folder path in the Title Bar
.PARAMETER DisableShowFullPathInTitleBar
Disables the showing of the full path in Windows Explorer Title Bar, see EnableShowFullPathInTitleBar
.PARAMETER EnableExpandToOpenFolder
Setting this switch will cause Windows Explorer to expand the navigation pane to the current open folder
.PARAMETER DisableExpandToOpenFolder
Disables the expanding of the navigation page to the current open folder in Windows Explorer, see EnableExpandToOpenFolder
.PARAMETER EnableOpenFileExplorerToQuickAccess
Setting this switch will cause Windows Explorer to open itself to the Computer view, rather than the Quick Access view
.PARAMETER DisableOpenFileExplorerToQuickAccess
Disables the Quick Access location and shows Computer view when opening Windows Explorer, see EnableOpenFileExplorerToQuickAccess
.PARAMETER EnableShowRecentFilesInQuickAccess
Setting this switch will cause Windows Explorer to show recently used files in the Quick Access pane
.PARAMETER DisableShowRecentFilesInQuickAccess
Disables the showing of recently used files in the Quick Access pane, see EnableShowRecentFilesInQuickAccess
.PARAMETER EnableShowFrequentFoldersInQuickAccess
Setting this switch will cause Windows Explorer to show frequently used directories in the Quick Access pane
.PARAMETER DisableShowFrequentFoldersInQuickAccess
Disables the showing of frequently used directories in the Quick Access pane, see EnableShowFrequentFoldersInQuickAccess
.LINK
http://boxstarter.org
#>
[CmdletBinding()]
param(
[switch]$EnableShowHiddenFilesFoldersDrives,
[switch]$DisableShowHiddenFilesFoldersDrives,
[switch]$EnableShowProtectedOSFiles,
[switch]$DisableShowProtectedOSFiles,
[switch]$EnableShowFileExtensions,
[switch]$DisableShowFileExtensions,
[switch]$EnableShowFullPathInTitleBar,
[switch]$DisableShowFullPathInTitleBar,
[switch]$EnableExpandToOpenFolder,
[switch]$DisableExpandToOpenFolder,
[switch]$EnableOpenFileExplorerToQuickAccess,
[switch]$DisableOpenFileExplorerToQuickAccess,
[switch]$EnableShowRecentFilesInQuickAccess,
[switch]$DisableShowRecentFilesInQuickAccess,
[switch]$EnableShowFrequentFoldersInQuickAccess,
[switch]$DisableShowFrequentFoldersInQuickAccess
)
$PSBoundParameters.Keys | % {
if($_-like "En*"){ $other="Dis" + $_.Substring(2)}
if($_-like "Dis*"){ $other="En" + $_.Substring(3)}
if($PSBoundParameters[$_] -and $PSBoundParameters[$other]) {
throw new-Object -TypeName ArgumentException "You may not set both $_ and $other. You can only set one."
}
}
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer'
$advancedKey = "$key\Advanced"
$cabinetStateKey = "$key\CabinetState"
Write-BoxstarterMessage "Setting Windows Explorer options..."
if(Test-Path -Path $key) {
if($EnableShowRecentFilesInQuickAccess) {Set-ItemProperty $key ShowRecent 1}
if($DisableShowRecentFilesInQuickAccess) {Set-ItemProperty $key ShowRecent 0}
if($EnableShowFrequentFoldersInQuickAccess) {Set-ItemProperty $key ShowFrequent 1}
if($DisableShowFrequentFoldersInQuickAccess) {Set-ItemProperty $key ShowFrequent 0}
}
if(Test-Path -Path $advancedKey) {
if($EnableShowHiddenFilesFoldersDrives) {Set-ItemProperty $advancedKey Hidden 1}
if($DisableShowHiddenFilesFoldersDrives) {Set-ItemProperty $advancedKey Hidden 0}
if($EnableShowFileExtensions) {Set-ItemProperty $advancedKey HideFileExt 0}
if($DisableShowFileExtensions) {Set-ItemProperty $advancedKey HideFileExt 1}
if($EnableShowProtectedOSFiles) {Set-ItemProperty $advancedKey ShowSuperHidden 1}
if($DisableShowProtectedOSFiles) {Set-ItemProperty $advancedKey ShowSuperHidden 0}
if($EnableExpandToOpenFolder) {Set-ItemProperty $advancedKey NavPaneExpandToCurrentFolder 1}
if($DisableExpandToOpenFolder) {Set-ItemProperty $advancedKey NavPaneExpandToCurrentFolder 0}
if($EnableOpenFileExplorerToQuickAccess) {Set-ItemProperty $advancedKey LaunchTo 2}
if($DisableOpenFileExplorerToQuickAccess) {Set-ItemProperty $advancedKey LaunchTo 1}
}
if(Test-Path -Path $cabinetStateKey) {
if($EnableShowFullPathInTitleBar) {Set-ItemProperty $cabinetStateKey FullPath 1}
if($DisableShowFullPathInTitleBar) {Set-ItemProperty $cabinetStateKey FullPath 0}
}
Restart-Explorer
}
function Update-ExecutionPolicy {
<#
.SYNOPSIS
Sets the execution policy for the current account
.DESCRIPTION
The execution policy is set in a separate elevated
PowerShell process. If running in the chocolatey runner,
the current window cannot be used because its execution
policy has been explicitly set.
If on a 64 bit machine, the policy will be set for both
64 and 32 bit shells.
.PARAMETER Policy
The execution policy to set
#>
param(
[ValidateSet('Unrestricted','RemoteSigned','AllSigned','Restricted','Default','Bypass','Undefined')]
[string]$policy
)
write-BoxstarterMessage "Setting PowerShell execution context to $policy"
if(Is64Bit) {
Start-Process "$env:SystemRoot\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" -verb runas -wait -argumentList "-noprofile -WindowStyle hidden -noninteractive -ExecutionPolicy unrestricted -Command `"Set-ExecutionPolicy $policy`""
}
Start-Process "powershell.exe" -verb runas -wait -argumentList "-noprofile -noninteractive -ExecutionPolicy unrestricted -WindowStyle hidden -Command `"Set-ExecutionPolicy $policy`""
}
function Is64Bit { [IntPtr]::Size -eq 8 }
$tools = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
. (Join-Path $tools Setup.ps1)
try {
$ModuleName = (Get-ChildItem $tools | ?{ $_.PSIsContainer }).BaseName
$preInstall = Join-Path $tools "$modulename.preinstall.ps1"
if(Test-Path $preInstall) { .$preInstall }
Install-Boxstarter $tools $ModuleName $env:chocolateyPackageParameters
} catch {
write-output $_ | fl * -force
throw $_.Exception
}
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
function Install-Boxstarter($here, $ModuleName, $installArgs = "") {
$boxstarterPath=Join-Path $env:AppData Boxstarter
if(!(test-Path $boxstarterPath)){
mkdir $boxstarterPath
}
$packagePath=Join-Path $boxstarterPath BuildPackages
if(!(test-Path $packagePath)){
mkdir $packagePath
}
foreach($ModulePath in (Get-ChildItem $here | ?{ $_.PSIsContainer })){
$target=Join-Path $boxstarterPath $modulePath.BaseName
if(test-Path $target){
Remove-Item $target -Recurse -Force
}
}
Copy-Item "$here\*" $boxstarterPath -Recurse -Force -Exclude ChocolateyInstall.ps1, Setup.*
PersistBoxStarterPathToEnvironmentVariable "PSModulePath"
PersistBoxStarterPathToEnvironmentVariable "Path"
$binPath = "$here\..\..\..\bin"
$boxModule=Get-Module Boxstarter.Chocolatey
if($boxModule) {
if($boxModule.Path -like "$env:LOCALAPPDATA\Apps\*") {
$clickonce=$true
}
}
if(!$clickonce){
Import-Module "$boxstarterPath\$ModuleName" -DisableNameChecking -Force -ErrorAction SilentlyContinue
}
$successMsg = @"
The $ModuleName Module has been copied to $boxstarterPath and added to your Module path.
You will need to open a new console for the path to be visible.
Use 'Get-Module Boxstarter.* -ListAvailable' to list all Boxstarter Modules.
To list all available Boxstarter Commands, use:
PS:>Import-Module $ModuleName
PS:>Get-Command -Module Boxstarter.*
To find more info visit http://Boxstarter.org or use:
PS:>Import-Module $ModuleName
PS:>Get-Help Boxstarter
"@
Write-Host $successMsg
if($ModuleName -eq "Boxstarter.Chocolatey" -and !$env:appdata.StartsWith($env:windir)) {
$desktop = $([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::DesktopDirectory))
$startMenu=$("$env:appdata\Microsoft\Windows\Start Menu\Programs\Boxstarter")
if(!(Test-Path $startMenu)){
mkdir $startMenu
}
$target="powershell.exe"
$targetArgs="-ExecutionPolicy bypass -NoExit -Command `"&'$boxstarterPath\BoxstarterShell.ps1'`""
if($installArgs -inotcontains "nodesktopicon") {
$link = Join-Path $desktop "Boxstarter Shell.lnk"
Create-Shortcut $link $target $targetArgs $boxstarterPath
}
$link = Join-Path $startMenu "Boxstarter Shell.lnk"
Create-Shortcut $link $target $targetArgs $boxstarterPath
Set-Content -Path "$binPath\BoxstarterShell.bat" -Force -Value "$target $TargetArgs"
}
}
function Create-Shortcut($location, $target, $targetArgs, $boxstarterPath) {
$wshshell = New-Object -ComObject WScript.Shell
$lnk = $wshshell.CreateShortcut($location)
$lnk.TargetPath = $target
$lnk.Arguments = "$targetArgs"
$lnk.WorkingDirectory = $boxstarterPath
$lnk.IconLocation="$boxstarterPath\BoxLogo.ico"
$lnk.Save()
$tempFile = "$env:temp\TempShortcut.lnk"
$writer = new-object System.IO.FileStream $tempFile, ([System.IO.FileMode]::Create)
$reader = new-object System.IO.FileStream $location, ([System.IO.FileMode]::Open)
while ($reader.Position -lt $reader.Length)
{
$byte = $reader.ReadByte()
if ($reader.Position -eq 22) {
$byte = 34
}
$writer.WriteByte($byte)
}
$reader.Close()
$writer.Close()
Move-Item -Path $tempFile $location -Force
}
function PersistBoxStarterPathToEnvironmentVariable($variableName){
$value = [Environment]::GetEnvironmentVariable($variableName, 'User')
if($value){
$values=($value -split ';' | ?{ !($_.ToLower() -match "\\boxstarter$")}) -join ';'
$values+=";$boxstarterPath"
}
elseif($variableName -eq "PSModulePath") {
$values=[environment]::getfolderpath("mydocuments")
$values +="\WindowsPowerShell\Modules;$boxstarterPath"
}
else {
$values ="$boxstarterPath"
}
if(!$value -or !($values -contains $boxstarterPath)){
$values = $values.Replace(';;',';')
[Environment]::SetEnvironmentVariable($variableName, $values, 'User')
$varValue = Get-Content env:\$variableName
$varValue += ";$boxstarterPath"
$varValue = $varValue.Replace(';;',';')
Set-Content env:\$variableName -value $varValue
}
}
Log in or click on link to see number of positives.
In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).
Chocolatey Pro provides runtime protection from possible malware.
Add to Builder | Version | Downloads | Last Updated | Status |
---|---|---|---|---|
Boxstarter WinConfig Module 3.0.0-beta-20220427-21 | 59 | Wednesday, April 27, 2022 | Exempted | |
Boxstarter WinConfig Module 2.13.0 | 147980 | Thursday, October 15, 2020 | Approved | |
Boxstarter WinConfig Module 2.12.0 | 391988 | Tuesday, October 30, 2018 | Approved | |
Boxstarter WinConfig Module 2.11.0 | 65628 | Wednesday, May 16, 2018 | Approved | |
Boxstarter WinConfig Module 2.10.3 | 53766 | Thursday, July 27, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.27 | 2572 | Wednesday, June 21, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.26 | 5390 | Monday, June 19, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.24 | 706 | Sunday, June 18, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.14 | 6898 | Friday, May 5, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.5 | 4795 | Thursday, March 30, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.2 | 1117 | Monday, March 27, 2017 | Approved | |
Boxstarter WinConfig Module 2.9.0 | 533 | Monday, March 27, 2017 | Approved | |
Boxstarter WinConfig Module 2.8.29 | 31425 | Sunday, May 22, 2016 | Approved | |
Boxstarter WinConfig Module 2.8.27 | 386 | Sunday, May 22, 2016 | Approved | |
Boxstarter WinConfig Module 2.8.21 | 1041 | Thursday, April 28, 2016 | Approved | |
Boxstarter WinConfig Module 2.8.18 | 679 | Tuesday, April 26, 2016 | Approved | |
Boxstarter WinConfig Module 2.8.12 | 1104 | Thursday, April 21, 2016 | Approved | |
Boxstarter WinConfig Module 2.8.0 | 1101 | Friday, April 15, 2016 | Approved | |
Boxstarter WinConfig Module 2.7.0 | 1989 | Sunday, April 3, 2016 | Approved | |
Boxstarter WinConfig Module 2.6.41 | 3744 | Sunday, February 28, 2016 | Approved | |
Boxstarter WinConfig Module 2.6.25 | 6619 | Friday, December 18, 2015 | Approved | |
Boxstarter WinConfig Module 2.6.20 | 454 | Thursday, December 17, 2015 | Approved | |
Boxstarter WinConfig Module 2.6.16 | 662 | Tuesday, December 15, 2015 | Approved | |
Boxstarter WinConfig Module 2.6.2 | 623 | Monday, December 14, 2015 | Approved | |
Boxstarter WinConfig Module 2.6.0 | 454 | Sunday, December 13, 2015 | Approved | |
Boxstarter WinConfig Module 2.5.21 | 9458 | Thursday, August 13, 2015 | Approved | |
Boxstarter WinConfig Module 2.5.19 | 1992 | Sunday, July 26, 2015 | Approved | |
Boxstarter WinConfig Module 2.5.10 | 1759 | Friday, July 10, 2015 | Approved | |
Boxstarter WinConfig Module 2.5.3 | 1294 | Wednesday, July 1, 2015 | Approved | |
Boxstarter WinConfig Module 2.5.1 | 500 | Wednesday, July 1, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.209 | 4521 | Sunday, April 26, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.205 | 2633 | Sunday, April 5, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.196 | 1440 | Friday, March 20, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.188 | 1250 | Monday, March 9, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.183 | 754 | Wednesday, March 4, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.180 | 468 | Tuesday, March 3, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.179 | 401 | Tuesday, March 3, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.159 | 2747 | Sunday, January 18, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.157 | 635 | Thursday, January 15, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.152 | 778 | Monday, January 12, 2015 | Approved | |
Boxstarter WinConfig Module 2.4.149 | 1336 | Friday, December 26, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.146 | 476 | Friday, December 26, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.128 | 1950 | Thursday, November 27, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.123 | 3808 | Wednesday, September 24, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.110 | 761 | Wednesday, September 17, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.93 | 704 | Friday, September 12, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.88 | 935 | Wednesday, September 3, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.87 | 458 | Wednesday, September 3, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.80 | 2710 | Monday, August 4, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.76 | 446 | Sunday, August 3, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.70 | 602 | Thursday, July 31, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.67 | 669 | Wednesday, July 30, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.61 | 645 | Monday, July 28, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.57 | 471 | Sunday, July 27, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.54 | 590 | Wednesday, July 23, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.53 | 395 | Wednesday, July 23, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.51 | 399 | Wednesday, July 23, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.48 | 486 | Tuesday, July 22, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.46 | 592 | Saturday, July 19, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.41 | 585 | Sunday, July 13, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.39 | 465 | Sunday, July 13, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.38 | 397 | Saturday, July 12, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.35 | 383 | Saturday, July 12, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.32 | 393 | Friday, July 11, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.29 | 1177 | Friday, July 4, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.26 | 994 | Monday, June 23, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.15 | 3040 | Sunday, April 20, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.12 | 443 | Saturday, April 19, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.4 | 806 | Saturday, April 5, 2014 | Approved | |
Boxstarter WinConfig Module 2.4.0 | 431 | Friday, April 4, 2014 | Approved | |
Boxstarter WinConfig Module 2.3.24 | 1868 | Saturday, February 1, 2014 | Approved | |
Boxstarter WinConfig Module 2.3.15 | 555 | Monday, January 27, 2014 | Approved | |
Boxstarter WinConfig Module 2.3.13 | 420 | Saturday, January 25, 2014 | Approved | |
Boxstarter WinConfig Module 2.3.8 | 517 | Thursday, January 23, 2014 | Approved | |
Boxstarter WinConfig Module 2.3.0 | 516 | Monday, January 20, 2014 | Approved | |
Boxstarter WinConfig Module 2.2.78 | 623 | Thursday, January 9, 2014 | Approved | |
Boxstarter WinConfig Module 2.2.59 | 794 | Sunday, December 29, 2013 | Approved | |
Boxstarter WinConfig Module 2.2.23 | 785 | Saturday, December 14, 2013 | Approved | |
Boxstarter WinConfig Module 2.2.16 | 447 | Friday, December 13, 2013 | Approved | |
Boxstarter WinConfig Module 2.2.15 | 335 | Friday, December 13, 2013 | Approved | |
Boxstarter WinConfig Module 2.2.12 | 408 | Friday, December 13, 2013 | Approved | |
BoxStarter WinConfig Module 2.2.0 | 421 | Thursday, December 12, 2013 | Approved | |
BoxStarter WinConfig Module 2.1.0 | 540 | Saturday, November 30, 2013 | Approved | |
BoxStarter WinConfig Module 2.0.25 | 432 | Wednesday, November 20, 2013 | Approved | |
BoxStarter WinConfig Module 2.0.11 | 413 | Monday, November 11, 2013 | Approved | |
BoxStarter WinConfig Module 2.0.4 | 447 | Saturday, November 9, 2013 | Approved | |
BoxStarter WinConfig Module 2.0.1 | 454 | Friday, November 8, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.40 | 502 | Tuesday, October 1, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.35 | 505 | Monday, August 12, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.30 | 476 | Sunday, August 11, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.22 | 447 | Thursday, August 8, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.18 | 468 | Tuesday, August 6, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.12 | 423 | Sunday, August 4, 2013 | Approved | |
BoxStarter WinConfig Module 1.1.0 | 464 | Thursday, August 1, 2013 | Approved | |
BoxStarter WinConfig Module 1.0.33 | 522 | Thursday, April 18, 2013 | Approved | |
BoxStarter WinConfig Module 1.0.20 | 458 | Monday, April 15, 2013 | Approved | |
BoxStarter WinConfig Module 1.0.13 | 482 | Monday, March 25, 2013 | Approved | |
BoxStarter WinConfig Module 1.0.3 | 466 | Wednesday, March 13, 2013 | Approved |
- Update vendored chocolatey to stable 0.10.7
- Update vendored chocolatey to stable 0.10.5
- Add required tags element to boxstarter.common nuspec
- Fix Set-ExplorerOption argument names
- Fix Nuspec dependencies to be exact
- Update vendored chocolatey to stable 0.10.4
- Randomize package names generated from script to avoid file locks
- Update vendored Chocolatey to 0.10.4 beta
- Add Icon toggling of task bar notifications in Set-TaskbarOptions
- Fix registry key name in Set-TaskbarOptions on some Windows 10 versions
- Fix Default of RebootOk in boxstarter shell
- Stop powershell profile loading when in powershell v2
-
- Boxstarter.Common (= 2.9.24)
Ground Rules:
- This discussion is only about Boxstarter WinConfig Module and the Boxstarter WinConfig Module package. If you have feedback for Chocolatey, please contact the Google Group.
- This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
- The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
- Tell us what you love about the package or Boxstarter WinConfig Module, or tell us what needs improvement.
- Share your experiences with the package, or extra configuration or gotchas that you've found.
- If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.