Skip to content

ChocolateySetting

dscbot edited this page Apr 19, 2023 · 1 revision

ChocolateySetting

Parameters

Parameter Attribute DataType Description Allowed Values
Ensure Write Ensure Indicate whether the Chocolatey Setting should be enabled or disabled on the system.
Name Key string Name - the name of the Setting.
Value Write string Value - the value of the Setting, if ensure is set to present. When Ensure is absent, the setting's value is cleared.
Reasons Read ChocolateyReason[]

Description

Chocolatey lets you set or unset general Settings. This resources lets you set or unset a Setting.

Examples

Example 1

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

configuration Example
{
    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateySetting ChococacheLocation {
            Ensure = 'Present'
            Name   = 'cacheLocation'
            Value  = 'C:\Temp\Choco'
        }
    }
}