Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
14.09k stars 16.14k forks source link

Arm template issue while creating AD with json and PS-DSC #3395

Open mishra1010 opened 7 years ago

mishra1010 commented 7 years ago

I am just trying to configure an Active Directory machine via ARM and PS-DSC entn. The VM provisioning works while the DSC extn fails with the following errors. Attached is the json and DSC script. Please help.

"message": "VM has reported a failure when processing extension 'Microsoft.Powershell.DSC'. Error message: \"The DSC Extension received an incorrect input: Compilation errors occurred while processing configuration 'Main'. Please review the errors reported in error stream and modify your configuration code appropriately. System.InvalidOperationException error processing property 'DomainAdministratorCredential' OF TYPE 'xADDomain': Converting and storing encrypted passwords as plain text is not recommended. For more information on securing credentials in MOF file

Calling Script used with parameters:

Define Variables

{ $location='Southeast Asia' $resourceGroupName='learn-iaas' $resourceDeploymentName='learn-iaas-deployment' $templatePath='E:'+'\Arm Temple'+'\AD' $templateFile='AD-VM.json'

$templateFile='Armtemplate-Iaas.json'

$template=$templatepath + '\'+$templatefile $password='India@123' $securePassword=$password|ConvertTo-SecureString -AsPlainText -Force }

Create ResourceGroup

{ New-AzureRmResourceGroup -Name $resourceGroupName -Location $location ` -Verbose -Force }

Deploy Resources

{ $additionalParameters=New-Object -TypeName Hashtable $additionalParameters['advmAdminPassword']=$securePassword

$additionalParameters['vmprivateAdminPassword']=$securePassword

New-AzureRmResourceGroupDeployment -Name $resourceDeploymentName -ResourceGroupName $resourceGroupName -TemplateFile $template -mode incremental -verbose @additionalParameters

}

mishra1010 commented 7 years ago

AD.ZIP

michaelsrichter commented 7 years ago

Was there any solution to this? Facing some problem. @simongdavies any ideas?