Skip to content

Instantly share code, notes, and snippets.

@jstangroome
Created October 1, 2013 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jstangroome/6775904 to your computer and use it in GitHub Desktop.
Save jstangroome/6775904 to your computer and use it in GitHub Desktop.
A simple example of nested PowerShell DSC Configurations used to modularize a more complex configuration for a Node
Configuration AspNet45WebServer {
WindowsFeature WebAspNet45 {
Name = 'Web-Asp-Net45'
Ensure = 'Present'
}
WindowsFeature WebWindowsAuth {
Name = 'Web-Windows-Auth'
Ensure = 'Present'
}
}
Configuration AspClassicWebServer {
param ($EnsureBasicAuth)
WindowsFeature WebAsp {
Name = 'Web-ASP'
Ensure = 'Present'
}
WindowsFeature WebBasicAuth {
Name = 'Web-Basic-Auth'
Ensure = $EnsureBasicAuth
}
}
Configuration CombinedWebServer {
Node localhost {
AspNet45WebServer aspnet45 {}
AspClassicWebServer classic {
EnsureBasicAuth = 'Present'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment