DSC and xADuser

So I am trying to combine ARM template and DSC configuration to be able to quickly spin up and tear down a simple DC environment. I see for Desired State Configuration has a xADuser setting to add AD users. My question is, How can I import a CSV file of just 50 users and then do a foreach loop for the xADuser?

The DSC works just fine except for adding the users in to AD.

$ADUsers=Import-csv -path “azure-quickstart-templates/active-directory-new-domain/DSC/Healthcare1.csv”

xADUser Loopofusers { foreach ($aduser in $adusers) { DomainName = $DomainName DomainAdministratorCredential = $DomainCreds UserName = $aduser.username Password = $DomainCreds Surname = $aduser.surname givenname = $ADuser.givenname } }

submitted by /u/DisturbingBeliefs
[link] [comments]

Leave a Reply