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?
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."
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
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
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.
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.
A. New-AzResource: This cmdlet is used to create individual Azure resources, not for deploying entire ARM templates.
B. New-AzResourceGroupDeployment: This cmdlet is specifically designed to deploy ARM templates at the resource group level, which is the correct scope for this template.
C. New-AzTenantDeployment: This cmdlet is used to deploy ARM templates at the tenant level, which is for resources that span multiple subscriptions or are not associated with a specific resource group.
D. New-AzDeployment: This is an older cmdlet that has been superseded by the more specific cmdlets like New-AzResourceGroupDeployment and New-AzTenantDeployment.
Therefore, the correct cmdlet to run is B. New-AzResourceGroupDeployment.
In another quest we ask to complet the Azure command and the choice was New-AzRessourcegroupedeployment. so it should this one for this question too or other quest as the wrong answer.
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.
https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azdeployment?view=azps-13.0.0
sorry, the comments is right but the option is wrong.
D is correct. because we are creating RG & Storage account, so we need to create it under subscription. we can not create RG under RG
B because the other option D - New-AzDeployment: This cmdlet is used to deploy resources at the subscription level rather than within a specific resource group.
chatGPT
B. New-AzResourceGroupDeployment
This cmdlet is used to deploy resources to a resource group using an ARM template.
Here’s a quick breakdown of the options:
New-AzResource: Creates a resource, but not necessarily using an ARM template.
New-AzResourceGroupDeployment: Deploys an ARM template specifically to a resource group.
New-AzTenantDeployment: Used to deploy resources at the tenant level.
New-AzDeployment: Deploys resources at the subscription level, but not specifically to a resource group.
So in this case, since the template involves deploying a storage account to a resource group, New-AzResourceGroupDeployment is the cmdlet you'd use.
"New-AzDeployment: Deploys resources at the subscription level, but not specifically to a resource group." I guess that means creating resources on sub level and rg is kind of a resource and here in question says creating new rg and storage account so D is correct i guess
I thought was B, but read the references herehttps://learn.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroupdeployment?view=azps-12.1.0, it's clearly D as we are deploying RG as well
D. New-AzDeployment is correct. Option B (New-AZResourceGroup) would have been an option only if RG already existed. Here we are first creating RG so the command has to be applicable at the Subscription level which is Option D
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
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.
Tinkers69
Highly Voted 2 years, 7 months agoQL112233
1 year, 3 months agoTarni
2 years, 7 months agoskydivex
2 years, 2 months agoAsymptote
Highly Voted 2 years, 6 months agoGarrethM
Most Recent 1 month, 3 weeks ago05e3903
2 months ago58b2872
3 months, 2 weeks agovrm1358
5 months agovrm1358
3 months, 1 week agoJosh219
4 months, 4 weeks agoJosh219
5 months, 3 weeks agoJosh219
5 months, 3 weeks agoDankho
6 months, 4 weeks ago[Removed]
7 months, 3 weeks ago117b84e
8 months agoJosh219
5 months, 3 weeks agoSanaz90
6 months, 2 weeks agoChristina666
9 months, 3 weeks agobcv
10 months ago60ties
10 months agotashakori
1 year, 1 month agoSDiwan
1 year, 3 months ago6Sam7
1 year, 3 months ago