Forum Discussion
Deploying VM Using ARM Template
Hello hkarthik_7 . Thanks for the assistance. I somehow encountered another challenge in deploying the VM from the generalized image. Please see screenshot attached.
Hi Antwaynio97 , this is because there are no parameters like -adminUsername, -adminPassword and similar values to the cmdlet New-AzResourceGroupDeployment. You have to specify the admin username for VM in the parameters template and save your password in Azure key vault and refer the URL to the secret in password section. Please specify all the certificates related values, SKU size of the VM, admin username, password, location and encapsulate everything in a parameters file. Then, you can run the cmdlet like
New-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" -TemplateFile "D:\Azure\Templates\EngineeringSite.json" -TemplateParameterFile "D:\Azure\Templates\EngSiteParms.json"
Please run "help New-AzResourceGroupDeployment -Full" to know the complete usage of cmdlet. You can export the template and parameter files, edit them according to your need and use the command to deploy.