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.
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
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.
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.
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
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
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 .
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"
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
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
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
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 1 year, 7 months agoQL112233
3 months agoTarni
1 year, 7 months agoskydivex
1 year, 1 month agoAsymptote
Highly Voted 1 year, 5 months agotashakori
Most Recent 1 month agoSDiwan
2 months, 1 week ago6Sam7
2 months, 4 weeks ago[Removed]
3 months, 2 weeks agomahesha9449295905
4 months, 1 week agonchebbi
5 months agoMooooosa
6 months agoXtraWest
6 months, 1 week agoMCI
2 months, 1 week agoemanresu
6 months, 2 weeks agoXtraWest
7 months agooopspruu
8 months agomark733050
8 months, 1 week agofjreoi
8 months, 1 week agoTeroristo
8 months, 3 weeks agoeduardokm
8 months, 3 weeks agoJosete1106
9 months ago