Skip to content

ChocolateyFeature

dscbot edited this page Oct 23, 2025 · 3 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key System.String Name - the name of the feature.
Ensure Write Ensure Indicate whether the Chocolatey feature should be enabled or disabled on the system. Absent, Present
Reasons Read ChocolateyReason[]

Description

Chocolatey configuration lets you enable or disabled features, but while some are set by defaults. This resources lets you enable or disable a feature, but also tells you if it's been set or just left as default.

Examples

Example 1

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

configuration Example {

    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateyFeature NoVIrusCheck {
            Ensure = 'Absent'
            Name   = 'viruscheck'
        }
    }
}

Clone this wiki locally