Last active
August 29, 2015 14:16
-
-
Save lawrencegripper/cee9b16f39db186e5f0b to your computer and use it in GitHub Desktop.
Machine Install DSC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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