Skip to content

Instantly share code, notes, and snippets.

@smurawski
Created April 7, 2014 21:02
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 smurawski/15db4b5f055a8ff1dcdd to your computer and use it in GitHub Desktop.
Save smurawski/15db4b5f055a8ff1dcdd to your computer and use it in GitHub Desktop.
Example of using ConfigurationData
Configuration NewServer
{
param(
[string[]]$DomainName='domain.com',
[pscredential]$Credential
)
Import-DSCResource -Module xComputerManagement
Node $AllNodes.NodeName
{
xComputer DomainJoin
{
Name = $Node.Name
DomainName = $DomainName
Credential = $Credential
}
}
}
$ConfigData = @{
AllNodes = @(
@{
NodeName = DSCTEST02
PSDscAllowPlainTextPassword = $true
}
)
}
NewServer -ConfigurationData $ConfigData -Credential (Get-Credential)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment