Skip to content

ChocolateySoftware

dscbot edited this page Mar 24, 2023 · 1 revision

ChocolateySoftware

Parameters

Parameter Attribute DataType Description Allowed Values
Ensure Key Ensure Indicate whether the Chocolatey Software should be installed or not on the system.
InstallationDirectory Write String
ChocolateyPackageUrl Write 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
PackageFeedUrl Write 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.
Version Write 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.
ChocoTempDir Write String The temporary folder to extract the Chocolatey Binaries during install. This does not set the Chocolatey Cache dir.
ProxyLocation Write string Proxy url to use when downloading the Chocolatey Package for installation.
IgnoreProxy Write bool Ensure the proxy is bypassed when downloading the Chocolatey Package from the URL.
ProxyCredential Write 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.
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'
        }
    }
}


# So there something