Home / Microsoft / AZ-300 / Question 43

Prev Question
Next Question

Question 43

A company is using a template to provision a new virtual machine (VM) in the RG03 resource group using PowerShell.

You need to ensure the following:

* The new VM is deployed.

* Resources already in the resource group are not affected.

How should you complete the PowerShell script? Select correct placeholder values.


-Name NewVMDeployment -ResourceGroupName RG03

-TemplateFile c:\MyTemplates\newvm.json



Explanation (click to expand)

You should complete the PowerShell script as follows:

New-AzResourceGroupDeployment -Mode Incremental

-Name NewVMDeployment -ResourceGroupName RG03

-TemplateFile c:\MyTemplates


The New-AzResourceGroupDeployment cmdlet is used to add a deployment to an existing resource group. You need to specify the incremental mode to add the new VM without changing the existing resources. You can use incremental mode to apply changes to existing resources, but you need to include all of that resource's parameters in the template.

You should not run the New-AzResourceGroup cmdlet. This is used to create a new resource group, not deploy resources to an existing group.

You should not run the Set-AzResourceGroup cmdlet. The cmdlet lets you modify resource group properties by to adding, changing, or deleting Azure tags applied to the resource group. It does not let you manage resources in the resource group.

You should not choose the Complete mode. This would cause any resources not included in the template to be deleted.

References (click to expand)

Prev Question
Next Question

Load more