Deploy across entire subscription: New-AzSubscriptionDeployment
Deploy across subscriptions in a management group: New-AzManagementGroupDeployment
Deploy within a specific resource group: New-AzResourceGroupDeployment
Deploy across entire organization (rare): New-AzTenantDeployment
chatgpt:
Use New-AzResourceGroupDeployment when deploying to a single resource group—it’s the most common cmdlet.
For large-scale governance and policies, use New-AzManagementGroupDeployment or New-AzTenantDeployment.
For multi-resource-group or subscription-level resources, use New-AzSubscriptionDeployment.
Never Trust AI
Answer: A
If you want to create a new resource group, you should use this command:
New-AzSubscriptionDeployment
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-subscription?tabs=azure-powershell#deployment-commands
Nice to know:
If you want to create new resources, you should use: New-AzResourceGroupDeployment.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-resource-group?tabs=azure-powershell#deployment-commands
PS:
To see the difference, take a look at the TemplateURI file.
C. New-AzResourceGroupDeployment
This is because, in many cases, Azure resources are deployed to specific resource groups. If you're unsure about the scope, it's safe to assume the deployment is intended for a resource group unless explicitly stated otherwise.
In question it's not mentioned deploy at which scope. So, we choose C
C. New-AzResourceGroupDeployment
The ARM template is creating a resource group. To deploy resources to a specific resource group in Azure, you should use the New-AzResourceGroupDeployment cmdlet. This cmdlet is designed to deploy templates to a specific resource group within an Azure subscription.
The other options are not correct:
 •     A. New-AzSubscriptionDeployment is used for deploying templates at the subscription level.
 •     B. New-AzManagementGroupDeployment is for deploying templates at the management group level.
 •     D. New-AzTenantDeployment is used for tenant-wide deployments, which is not applicable here.
That's very clear logic to go by. You deploy resource groups to a subscription. You deploy resources to a resource group. Depening on where you deploy, that's the cmdlet you use.
A. New-AzSubscriptionDeployment
This cmdlet is used to deploy resources at the subscription level, which is required when creating new resource groups as they are a subscription-level resource.
Answer is C according to Bard and ChatGPT:
Here's the PowerShell command to deploy an ARM template that creates a new resource group named "Marketing":
PowerShell
New-AzResourceGroupDeployment -Name <deployment-name> `
-ResourceGroupName Marketing `
-TemplateFile <path-to-template.json> `
-location <location>
How could be C ?
You need to deploy a resource group to the subscription scope. The New-AzReesourceGroupDeployment deploy a resource inside the resource groupe scope.
My mistake, I miss understood the question, according to the reference I found the answer should be A.
To deploy to a subscription, use New-AzSubscriptionDeployment which is an alias of the New-AzDeployment cmdlet:
command: New-AzSubscriptionDeployment -Location <location> -TemplateFile <path-to-template>
Since the resource group is specified in the config.
Reference:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-powershell
https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-11.1.0
This section is not available anymore. Please use the main Exam Page.AZ-104 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
moadabdou
Highly Voted 1Â year agoozansenturk
3Â months, 4Â weeks agoc75e123
3Â months, 4Â weeks ago[Removed]
Highly Voted 1Â year, 5Â months agoJosh219
Most Recent 5Â months, 1Â week agoa59c97f
6Â months ago[Removed]
7Â months, 1Â week agoTeerawee
7Â months, 3Â weeks agoalsmk2
8Â months, 2Â weeks agoDankho
6Â months, 2Â weeks agoHONEY898
9Â months agoAmir1909
1Â year, 2Â months agoJhonnyBe
1Â year, 2Â months agoD1nk8887
1Â year, 2Â months agoArthur_zw
1Â year, 3Â months agoMCI
1Â year, 2Â months agotfdestroy
1Â year, 3Â months agotfdestroy
1Â year, 3Â months agogswar
1Â year, 5Â months ago01111010
1Â year, 5Â months ago01111010
1Â year, 5Â months agosheilawu
1Â year, 4Â months agoziggy1117
1Â year, 5Â months ago[Removed]
1Â year, 5Â months ago