Skip to content

ChocolateyPin

dscbot edited this page Oct 23, 2025 · 3 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key System.String
Ensure Write Ensure Indicate whether the Chocolatey Pin should be enabled or disabled for this package. Absent, Present
Version Write System.String Version of the Package to pin.
Reasons Read ChocolateyReason[]

Description

Chocolatey lets you pin package versions so they don't get updated. This resources lets you set or remove a Pin.

Examples

Example 1

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

configuration Example
{
    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateyPin AddPintoPackage {
            Ensure = 'Present'
            Name   = 'Putty'
        }
    }
}

Example 2

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

configuration Example
{
    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateyPin AddPintoPackage {
            Ensure  = 'Present'
            Name    = 'Putty'
            Version = '0.71'
        }
    }
}

Example 3

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

configuration Example
{
    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateyPin AddPintoPackage {
            Ensure  = 'Absent'
            Name    = 'Putty'
            Version = '0.71'
        }
    }
}

Clone this wiki locally