Skip to content

Instantly share code, notes, and snippets.

@pcgeek86
Created September 10, 2014 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcgeek86/641d06f2b2eada7fbf76 to your computer and use it in GitHub Desktop.
Save pcgeek86/641d06f2b2eada7fbf76 to your computer and use it in GitHub Desktop.
PowerShell DSC Configuration to deploy the Microsoft DSC Resource Kit Wave 6
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