examples/chocolateyConfig.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
configuration Chocolatey {
    Import-DscResource -ModuleName Chocolatey

    Node localhost {
        ChocolateySoftware ChocoInst {
            Ensure = 'Present'
        }

        ChocolateySource ChocolateyOrg {
            DependsOn = '[ChocolateySoftware]ChocoInst'
            Ensure    = 'Present'
            Name      = 'Chocolatey'
            Source    = 'https://chocolatey.org/api/v2'
            Priority  = 0
            Disabled  = $false
        }

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

        ChocolateyPackage Putty {
           DependsOn          = '[ChocolateySoftware]ChocoInst'
            Ensure            = 'Present'
            Name              = 'Putty'
            Version           = 'Latest'
            ChocolateyOptions = @{ source = 'https://chocolatey.org/api/v2/' }
        }
    }
}