Skip to content

ChocolateySoftware

dscbot edited this page Oct 23, 2025 · 3 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
Ensure Key Ensure Indicate whether the Chocolatey Software should be installed or not on the system. Absent, Present
ChocolateyPackageUrl Write System.String Exact URL of the chocolatey package. This can be an HTTP server, a network or local path. This must be the .nupkg package as downloadable from here: https://chocolatey.org/packages/chocolatey
ChocoTempDir Write System.String The temporary folder to extract the Chocolatey Binaries during install. This does not set the Chocolatey Cache dir.
IgnoreProxy Write System.Boolean Ensure the proxy is bypassed when downloading the Chocolatey Package from the URL.
InstallationDirectory Write System.String
PackageFeedUrl Write System.String Url of the NuGet Feed API to use for looking up the latest version of Chocolatey (available on that feed). This is also used when searching for a specific version, doing a lookup via an Odata filter.
ProxyCredential Write System.Management.Automation.PSCredential Credential to authenticate to the proxy, if not specified but the ProxyLocation is set, an attempt to use the Cached credential will be made.
ProxyLocation Write System.String Proxy url to use when downloading the Chocolatey Package for installation.
Version Write System.String Version to install if you want to be specific, this is the way to Install a pre-release version, as when not specified, the latest non-prerelease version is looked up from the feed defined in PackageFeedUrl.
Reasons Read ChocolateyReason[]

Description

Install Chocolatey Software either from a fixed URL where the chocolatey nupkg is stored, or from the url of a NuGet feed containing the Chocolatey Package. A version can be specified to lookup the Package feed for a specific version, and install it. A proxy URL and credential can be specified to fetch the Chocolatey package, or the proxy configuration can be ignored.

Examples

Example 1

This is an unofficial module with DSC resource to Install and configure Chocolatey.

configuration Example
{
    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateySoftware ChococacheLocation {
            Ensure = 'Present'
            InstallationDirectory  = 'C:\Temp\Choco'
        }
    }
}

Clone this wiki locally