Skip to content

Instantly share code, notes, and snippets.

@lawrencegripper
Last active August 29, 2015 14:16
Show Gist options
  • Save lawrencegripper/cee9b16f39db186e5f0b to your computer and use it in GitHub Desktop.
Save lawrencegripper/cee9b16f39db186e5f0b to your computer and use it in GitHub Desktop.
Machine Install DSC
Configuration myChocoConfig
{
$PackagesToInstall = @('foxitreader','spotify', 'git');
Import-DscResource -Module cChoco
Node "localhost"
{
cChocoInstaller installChoco
{
InstallDir = "c:\choco"
}
foreach ($package in $PackagesToInstall)
{
$Number += 1
$thisFile = "$package$Number"
cChocoPackageInstaller $package
{
Name = $package
DependsOn = "[cChocoInstaller]installChoco"
}
}
}
}
myChocoConfig
Start-DscConfiguration .\myChocoConfig -wait -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment