Mark is leading an Infrastructure as Code workshop for Claire, the DevOps Solutions Trainee at MDFT Pro educational services. During their Azure Resource Manager (ARM) template certification training, they’re working in Azure Cloud Shell to deploy virtual machine infrastructure using declarative templates.
Mark has prepared a PowerShell script that will deploy a VM using an ARM template hosted at a specific URI, but Claire needs to identify the correct PowerShell cmdlet to complete the deployment command. The scenario demonstrates best practices for automated infrastructure deployment and parameter passing for secure credential handling.
The following resources are available in their training environment:
Name | Type | Details |
---|---|---|
ManagementGroup1 | Management group | Organizational structure |
RG1 | Resource group | Target deployment location |
9c8bc1cd-7655-4c66-b3ea-a8ee101d8f75 | Subscription ID | Active subscription |
Tag1 | Tag | Resource labeling |
In Azure Cloud Shell, you need to create a virtual machine by using an Azure Resource Manager (ARM) template. The PowerShell command structure is:
$adminPassword = Read-Host -Prompt "Enter the administrator password" -AsSecureString
New-__________
-TemplateUri "https://mdftpro.com/templates/...."
-adminUsername admin
-adminPassword $adminPassword
__________
-dnsLabelPrefix ContosoVM1
Mark needs to show his students how to complete the “New-” command.
Which PowerShell cmdlet should complete the command?
Choose the correct answer from the options below.
Explanations for each answer: