Skip to content

Instantly share code, notes, and snippets.

@gaelcolas
Created January 28, 2018 23:17
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 gaelcolas/6cba6fbdac9baa7cf5773ab6b9475e44 to your computer and use it in GitHub Desktop.
Save gaelcolas/6cba6fbdac9baa7cf5773ab6b9475e44 to your computer and use it in GitHub Desktop.
configuration MyConfig {
Param()
if($Node.Role -contains 'DHCPData' -and $Node.Customers -eq 'CustomerA') {
$Domain = $ConfigurationData.customerA.Domain
}
else {
$Domain = $ConfigurationData.DefaultDomain.Domain
}
File MyDomainFile {
Ensure = 'Present'
DestinationPath = "C:\Domain.txt"
Contents = "$Domain"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment