-
-
Save smurawski/15db4b5f055a8ff1dcdd to your computer and use it in GitHub Desktop.
Example of using ConfigurationData
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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