Skip to content

Instantly share code, notes, and snippets.

@JamesDawson
Created July 9, 2013 10:48
Show Gist options
  • Select an option

  • Save JamesDawson/5956472 to your computer and use it in GitHub Desktop.

Select an option

Save JamesDawson/5956472 to your computer and use it in GitHub Desktop.
configuration SimpleConfig2
{
node LAB-WEB01
{
File MarkerFile
{
DestinationPath = 'C:\deployed.txt'
Contents = ""
Requires = "[Group]FooGroup","[Registry]EnableRdp"
}
Group FooGroup
{
Ensure = "Present"
Name = "Foo"
Members = @("foobar")
Requires = "[User]FooBarUser"
}
User FooBarUser
{
Ensure = "Present"
UserName = "foobar"
Description = "an important service account"
FullName = "FooBar Service Account"
Disabled = $False
Password = New-Object System.Management.Automation.PSCredential ("username", (ConvertTo-SecureString "P4ssw0rd1" -AsPlainText -Force))
PasswordNeverExpires = $True
}
Registry EnableRdp
{
Key = "HKLM:SYSTEM\CurrentControlSet\Control\Terminal Server";
ValueName = "fDenyTSConnections";
ValueData = "0";
ValueType = "DWord";
}
Script SetTimezone
{
GetScript = { return @{ Timezone = ("{0}" -f (tzutil.exe /g)) } }
TestScript = { return (tzutil.exe /g) -ieq "GMT Standard Time" }
SetScript = { tzutil.exe /s "GMT Standard Time" }
}
}
}
SimpleConfig2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment