exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 4 question 100 discussion

Actual exam question from Microsoft's AZ-104
Question #: 100
Topic #: 4
[All AZ-104 Questions]

You have an Azure subscription.

You create the following Azure Resource Manager (ARM) template named Template.json.



You need to deploy Template.json.

Which PowerShell cmdlet should you run from Azure Cloud Shell?

  • A. New-AzSubscriptionDeployment
  • B. New-AzManagementGroupDeployment
  • C. New-AzResourceGroupDeployment
  • D. New-AzTenantDeployment
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
moadabdou
Highly Voted 11 months, 1 week ago
Selected Answer: A
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
upvoted 15 times
ozansenturk
2 months ago
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.
upvoted 1 times
c75e123
2 months ago
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.
upvoted 2 times
...
...
...
[Removed]
Highly Voted 1 year, 3 months ago
Selected Answer: A
A is correct because RG is already mentioned in the template.
upvoted 14 times
...
Josh219
Most Recent 3 months, 2 weeks ago
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
upvoted 1 times
...
a59c97f
4 months, 1 week ago
A is correct.
upvoted 1 times
...
[Removed]
5 months, 2 weeks ago
Selected Answer: A
A is correct
upvoted 1 times
...
Teerawee
6 months ago
Selected Answer: 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.
upvoted 3 times
...
alsmk2
6 months, 3 weeks ago
Definitely A - you wouldn't deploy a resource group to a resource group.
upvoted 6 times
Dankho
4 months, 3 weeks ago
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.
upvoted 1 times
...
...
HONEY898
7 months, 1 week ago
Selected Answer: A
New-AzSubscriptionDeployment
upvoted 2 times
...
Amir1909
1 year ago
A is correct
upvoted 1 times
...
JhonnyBe
1 year ago
Selected Answer: A
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.
upvoted 3 times
...
D1nk8887
1 year ago
Check question #102. That question uses the Subscription level deployment (as part of the question) to deploy RGs.
upvoted 1 times
...
Arthur_zw
1 year, 1 month ago
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>
upvoted 2 times
MCI
1 year, 1 month ago
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.
upvoted 1 times
...
...
tfdestroy
1 year, 2 months ago
Selected Answer: C
New-AzResourceGroupDeployment -Name <deployment-name> ` -ResourceGroupName <resource-group-name> ` -TemplateFile $templateFile ` -TemplateParameterObject $parameters
upvoted 1 times
tfdestroy
1 year, 2 months ago
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
upvoted 2 times
...
...
gswar
1 year, 3 months ago
A is correct as the template file is create a resource group which has to be done at the subscription level.
upvoted 2 times
...
01111010
1 year, 3 months ago
Selected Answer: D
A is correct answer. Tested in the lab. New-AzSubscriptionDeployment -Location eastus -TemplateFile template_q101.json
upvoted 4 times
01111010
1 year, 3 months ago
A is correct. I selected D by mistake. Can't edit previous post.
upvoted 3 times
sheilawu
1 year, 2 months ago
hahaha
upvoted 1 times
...
...
...
ziggy1117
1 year, 3 months ago
Selected Answer: A
Defn A bec creating an RG is in the subscription level
upvoted 3 times
...
[Removed]
1 year, 4 months ago
A is Correct because we are going to create RG from Template
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago