Skip to content

Instantly share code, notes, and snippets.

@nyanhp
Created November 23, 2017 13:55
Show Gist options
  • Save nyanhp/87f724f0e9df5b1558cef762225868fc to your computer and use it in GitHub Desktop.
Save nyanhp/87f724f0e9df5b1558cef762225868fc to your computer and use it in GitHub Desktop.
Simple DSC configuration of lab machines
configuration myConfig
{
node localhost
{
File f
{
DestinationPath = "C:\HelloIAmYour.File"
Contents = "It works so well, you gotta love AutomatedLab!"
}
}
}
# yes, it is that easy...
Invoke-LabDscConfiguration -Configuration (Get-Command myConfig) -ComputerName labMachine1 -Wait -Verbose
# Don't want it any longer?
Remove-LabDscLocalConfigurationManagerConfiguration -ComputerName labMachine1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment