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.
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
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.
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, 5 months agoQL112233
1 year, 1 month agoTarni
2 years, 5 months agoskydivex
2 years agoAsymptote
Highly Voted 2 years, 4 months ago58b2872
Most Recent 1 month, 1 week agovrm1358
2 months, 4 weeks agovrm1358
1 month agoJosh219
2 months, 3 weeks agoJosh219
3 months, 2 weeks agoJosh219
3 months, 2 weeks agoDankho
4 months, 3 weeks ago[Removed]
5 months, 2 weeks ago117b84e
5 months, 3 weeks agoJosh219
3 months, 2 weeks agoSanaz90
4 months, 2 weeks agoChristina666
7 months, 2 weeks agobcv
7 months, 3 weeks ago60ties
7 months, 3 weeks agotashakori
11 months, 2 weeks agoSDiwan
1 year ago6Sam7
1 year, 1 month ago[Removed]
1 year, 2 months agomahesha9449295905
1 year, 2 months ago