Instantly share code, notes, and snippets.

Embed
What would you like to do?
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