Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AZ-104 topic 4 question 77 discussion

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

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?

  • A. New-AzResource
  • B. New-AzResourceGroupDeployment
  • C. New-AzTenantDeployment
  • D. New-AzDeployment
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Deployment scope.
You can target your deployment to a resource group, subscription, management group, or tenant. Depending on the scope of the deployment, you use different commands.
To deploy to a resource group, use New-AzResourceGroupDeployment.
Incorrect:
Not C: To deploy to a tenant, use New-AzTenantDeployment.
Not D: To deploy to a subscription, use New-AzSubscriptionDeployment which is an alias of the New-AzDeployment cmdlet.
To deploy to a management group, use New-AzManagementGroupDeployment.
Not A: The New-AzResource cmdlet creates an Azure resource, such as a website, Azure SQL Database server, or Azure SQL Database, in a resource group.
Reference:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-powershell

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Tinkers69
Highly Voted 1 year, 7 months ago
Selected Answer: D
D is correct here. We are creating RG and storage acc. in this RG. By using New-AzResourceGroupDeployment command -> "Adds an Azure deployment to a resource group."
upvoted 42 times
QL112233
3 months ago
The question is what command used for deploy the template listed there, which deploys a storage account, which means deploy resource to group instead of create a resource group. So B should be right
upvoted 1 times
...
Tarni
1 year, 7 months ago
Agree Answer should be D 1. The New-AzDeployment cmdlet adds a deployment at the current subscription scope. This includes the resources that the deployment requires. https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-8.3.0
upvoted 7 times
...
skydivex
1 year, 1 month ago
agreed..... To add resources to a resource group, use the New-AzResourceGroupDeployment which creates a deployment at a resource group. The New-AzDeployment cmdlet creates a deployment at the current subscription scope, which deploys subscription level resources.
upvoted 2 times
...
...
Asymptote
Highly Voted 1 year, 5 months ago
Selected Answer: D
D New-AzResource - creates an Azure resource, such as a website, Azure SQL Database server, or Azure SQL Database, in a resource group. Reference: https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azresource New-AzResourceGroupDeployment - adds a deployment to an existing resource group. Reference: https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroupdeployment New-AzDeployment - The New-AzDeployment cmdlet adds a deployment at the current subscription scope. This includes the resources that the deployment requires. Reference: https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment Ner-AzTenanDeployment just exceeded the scope.
upvoted 17 times
...
tashakori
Most Recent 1 month ago
D is correct
upvoted 1 times
...
SDiwan
2 months, 1 week ago
Selected Answer: D
Coreect answer is D. The arm template is creating a resource group. So the scope of deployment must be subscription level
upvoted 1 times
...
6Sam7
2 months, 4 weeks ago
The New-AzResourceGroupDeployment cmdlet adds a deployment to an existing resource group. This includes the resources that the deployment requires. An Azure resource is a user-managed Azure entity, such as a database server, database, website, virtual machine, or Storage account. Seems B is correct
upvoted 1 times
...
[Removed]
3 months, 2 weeks ago
Answer is B We are creating RG Use New-AzDeployment for deploying resources at the subscription level. Use New-AzResourceGroupDeployment for deploying resources within a specific resource group.
upvoted 1 times
...
mahesha9449295905
4 months, 1 week ago
The New-AzResourceGroupDeployment cmdlet adds a deployment to an existing resource group
upvoted 2 times
...
nchebbi
5 months ago
Selected Answer: D
Answer is D: New-AzDeployment which is an lias to New-AzSubscriptionDeployment, the ARM template is creating a RG and a storage account, so it should be at subscription level. Take a look at this example & check the templateFile that's being used. https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-resource-manager/templates/deploy-to-subscription.md#powershell To people who are saying it should be B: New-AzResourceGroup, this cmdlet takes a param -ResourceGroupName of the resource group, what RG will you pass there? the one you are creating??? this one is for creating resources under that RG provided via the param ResourceGroupName
upvoted 2 times
...
Mooooosa
6 months ago
New-AzResourceGroupDeployment- Adds an Azure deployment to a resource group. New-AzDeployment - Create a deployment at the current subscription scope. check links https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroupdeployment?view=azps-10.4.1 https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-10.4.1
upvoted 1 times
...
XtraWest
6 months, 1 week ago
Selected Answer: B
New-AzResourceGroupDeployment -ResourceGroupName <ResourceGroupName> -TemplateFile <TemplateFilePath> -TemplateParameterFile <ParameterFilePath>
upvoted 2 times
MCI
2 months, 1 week ago
New-AzResourceGroupDeployment: 7:02:47 PM - Error: Code=ResourceGroupNotFound; Message=Resource group 'az104test' could not be found. New-AzResourceGroupDeployment: The deployment validation failed This is the message you get when you run New-AzResourceGroupDeployment .
upvoted 1 times
...
...
emanresu
6 months, 2 weeks ago
Selected Answer: D
To add resources to a resource group, use the New-AzResourceGroupDeployment which creates a deployment at a resource group. The New-AzDeployment cmdlet creates a deployment at the current subscription scope, which deploys subscription level resources. The question mentions "to create a resource group so it must be D then"
upvoted 1 times
...
XtraWest
7 months ago
Selected Answer: B
New-AzResourceGroupDeployment
upvoted 1 times
...
oopspruu
8 months ago
Selected Answer: D
The question says "to create a resource group and deploy an Azure Storage account to the resource group" You can create a resource group inside a Subscription, hence you need to use the cmdlt that deploys to a Subscription. The correct options are: use New-AzSubscriptionDeployment which is an alias of the New-AzDeployment
upvoted 1 times
...
mark733050
8 months, 1 week ago
If you are deploying from powershell the answer is B. New-AzResourceGroupDeployment If you are deploying from Azure CLI the answer would be "az deployment group create" The example JSON at the bottom of this page creates a resource group and storage account. https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-resource-group?tabs=azure-cli
upvoted 1 times
...
fjreoi
8 months, 1 week ago
Attention, les deux réponses B et D ont été inversés sur le sujet LA bonne réponse est : New-AzResourceGroupDeployment
upvoted 1 times
...
Teroristo
8 months, 3 weeks ago
Answer(s): B Explanation: Deployment scope. You can target your deployment to a resource group, subscription, management group, or tenant. Depending on the scope of the deployment, you use different commands. To deploy to a resource group, use New-AzResourceGroupDeployment. Incorrect: Not C: To deploy to a tenant, use New-AzTenantDeployment. Not D: To deploy to a subscription, use New-AzSubscriptionDeployment which is an alias of the New-AzDeployment cmdlet. To deploy to a management group, use New-AzManagementGroupDeployment. Not A: The New-AzResource cmdlet creates an Azure resource, such as a website, Azure SQL Database server, or Azure SQL Database, in a resource group. Reference: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-powershell
upvoted 1 times
eduardokm
8 months, 3 weeks ago
For the New-AzResourceGroupDeployment the parameter "ResourceGroupName" is mandatory, and the RG1 still needs to be created.
upvoted 3 times
...
...
Josete1106
9 months ago
D is correct!!
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 ...