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, 2 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 37 times
skydivex
9 months, 2 weeks 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
...
Tarni
1 year, 2 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 6 times
...
...
Asymptote
Highly Voted 1 year, 1 month 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
...
nchebbi
Most Recent 3 weeks, 2 days 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
1 month, 3 weeks 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
2 months ago
Selected Answer: B
New-AzResourceGroupDeployment -ResourceGroupName <ResourceGroupName> -TemplateFile <TemplateFilePath> -TemplateParameterFile <ParameterFilePath>
upvoted 2 times
...
emanresu
2 months 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
2 months, 3 weeks ago
Selected Answer: B
New-AzResourceGroupDeployment
upvoted 1 times
...
oopspruu
3 months, 3 weeks 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
3 months, 3 weeks 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
3 months, 4 weeks 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
4 months, 1 week 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
4 months, 1 week ago
For the New-AzResourceGroupDeployment the parameter "ResourceGroupName" is mandatory, and the RG1 still needs to be created.
upvoted 3 times
...
...
Josete1106
4 months, 3 weeks ago
D is correct!!
upvoted 1 times
...
XtraWest
5 months ago
Selected Answer: B
To deploy an Azure Resource Manager (ARM) template, you can use the New-AzResourceGroupDeployment cmdlet in Azure PowerShell. This cmdlet allows you to deploy a template to a resource group.
upvoted 2 times
...
Tomix
5 months, 1 week ago
B. New-AzResourceGroupDeployment
upvoted 2 times
...
RandomNickname
6 months, 1 week ago
Selected Answer: D
I'm with D as per below URL. https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-10.0.0&viewFallbackFrom=azps-9.7.0 You're adding RG and Storage not resources. From URL; The New-AzDeployment cmdlet adds a deployment at the current subscription scope. This includes the resources that the deployment requires. An Azure resource is a user-managed Azure entity. A resource can live in a resource group, like database server, database, website, virtual machine, or Storage account. Or, it can be a subscription level resource, like role definition, policy definition, etc. 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 1 times
conip
2 months, 3 weeks ago
IMHO its B: as your quote says: storage account goes into RG. so you need to use New-AzResourceGroupDeployment New-AzDeployment cmdlet creates a deployment at the current subscription scope, which deploys subscription level resources.
upvoted 1 times
...
...
maxustermann
6 months, 3 weeks ago
Selected Answer: B
Answers have been switched, its B now: New-AzResourceGroupDeployment
upvoted 10 times
...
vinsom
7 months, 1 week ago
Answer: D. New-AzDeployment 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. Ref: https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-9.7.0
upvoted 2 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 ...