Open nitin16 opened 8 years ago
@mgreenegit Can you take a look at this question?
I am pass this error, For some reason it was not finding deployment template.
I am getting following error though. not much information about error.
New-AzureRmResourceGroupDeployment : 11:45:38 AM - Resource microsoft.automation/automationAccounts/Modules 'AutomationAccount3/xNetworking' failed with message 'The resource operation completed with terminal provisioning state 'Failed'.' At C:\Users\nitinb\Source\Play area\ARM-ScaleSetmanagedbyAADSC\psDeploy.ps1:20 char:1
- CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
- FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand
I see this in extension configuration, should we need to update it for actual key passed though parameters?
{ "Name": "RegistrationKey", "Value": { "UserName": "PLACEHOLDER_DONOTUSE", "Password": "PrivateSettingsRef:registrationKeyPrivate" }, "TypeName": "System.Management.Automation.PSCredential" },
@nitin16 That's what it seems like. You need to supply values to the parameter https://github.com/Azure/azure-quickstart-templates/blob/master/201-vmss-automation-dsc/azuredeploy.json#L75
I have noticed poweshell script example provided passes template parameter files and dynamic variables which are used in template.
` $RegistrationInfo = Get-AzureRmAutomationRegistrationInfo -ResourceGroupName $ResourceGroupName -AutomationAccountName $AccountName
New-AzureRmResourceGroupDeployment -Name TestDeployment -ResourceGroupName $ResourceGroupName -TemplateFile .\azuredeploy.json -TemplateParameterFile .\azuredeploy.parameters.json -registrationKey ($RegistrationInfo.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force) -registrationUrl $RegistrationInfo.Endpoint -automationAccountName $AccountName -jobId (New-GUID) -adminUsername $credential.UserName -adminPassword $credential.Password -domainNameLabel $DomainNameLabel -Verbose `
For some reason it throws an error when i try to run same through powershell ISE and get error saying registrationKey is not valid parameter.
Is there something I need to install before I run this script?