Azure / Azure/azure-quickstart-templates

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

Open
#3,395 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

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


}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing AD-VM.json and the DSC configuration named Main, then compare the reported DomainAdministratorCredential error with the parameters passed by the shown PowerShell deployment script. Done means the DSC extension compiles the configuration successfully and the Active Directory VM deployment completes without the reported credential error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.