Created
September 10, 2014 15:29
-
-
Save pcgeek86/641d06f2b2eada7fbf76 to your computer and use it in GitHub Desktop.
PowerShell DSC Configuration to deploy the Microsoft DSC Resource Kit Wave 6
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 DSCWave { | |
Archive DSCWave { | |
DependsOn = '[Script]DSCWave'; | |
Ensure = 'Present'; | |
Path = "$env:windir\temp\DSC Resource Kit Wave 6 08212014.zip"; | |
Destination = "$env:ProgramFiles\WindowsPowerShell\Modules"; | |
} | |
Script DSCWave { | |
GetScript = { @{ Result = (Test-Path -Path "$env:windir\temp\DSC Resource Kit Wave 6 08212014.zip"); } }; | |
SetScript = { | |
$Uri = 'http://gallery.technet.microsoft.com/DSC-Resource-Kit-All-c449312d/file/124120/1/DSC%20Resource%20Kit%20Wave%206%2008212014.zip'; | |
$OutFile = "$env:windir\temp\DSC Resource Kit Wave 6 08212014.zip"; | |
Invoke-WebRequest -Uri $Uri -OutFile $OutFile; | |
Unblock-File -Path $OutFile; | |
}; | |
TestScript = { Test-Path -Path "$env:windir\temp\DSC Resource Kit Wave 6 08212014.zip"; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment