You develop the following Azure Resource Manager (ARM) template to create a resource group and deploy an Azure Storage account to the resource group.
Which cmdlet should you run to deploy the template?
Correct Answer: B
In Microsoft Azure, Azure Resource Manager (ARM) templates are JSON-based files used to define and automate the deployment of Azure resources in a consistent and repeatable manner. To deploy an ARM template, the PowerShell cmdlet you use depends on the deployment scope - whether the template targets a tenant, management group, subscription, or resource group.
According to the Microsoft Azure Administrator documentation (AZ-104 Study Guide, "Deploy and Manage Azure Resource Manager Templates"):
New-AzTenantDeployment # Used for tenant-level deployments, typically involving management group creation or tenant-wide policies.
New-AzSubscriptionDeployment # Used for subscription-level deployments, when resources are created directly under the subscription rather than within a resource group.
New-AzResourceGroupDeployment # Used for resource group-level deployments, which is the most common scenario for creating and managing resources such as virtual machines, storage accounts, and virtual networks.
New-AzDeployment # An older alias that may refer to subscription-level deployments in older Az modules but is not the standard for resource group deployments.
In this question, the ARM template defines both a resource group and a storage account that will be deployed within that resource group. Therefore, the correct PowerShell cmdlet to use is:
New-AzResourceGroupDeployment `
-ResourceGroupName <RGName> `
-TemplateFile <PathToTemplateFile>
This cmdlet processes the specified ARM template file, validates the schema, and provisions all the resources defined in the template inside the target resource group.
Hence, based on the Azure Resource Manager official documentation and exam objectives, the correct answer is: