Start here! Get your feet wet with the Microsoft cloud and begin your journey to earning your Microsoft Certified: Azure Fundamentals certification!
Prepare and test your skills

Prepare and test your skills

Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
An IT administrator is managing a critical storage account named corpdata in a resource group named rg-production.
The team must be able to continue updating the storage account's configuration and accessing data, but the organization wants to prevent any user from accidentally deleting the storage account.
Which Azure PowerShell command should the administrator execute to apply the appropriate resource lock?
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
The New-AzResourceLock cmdlet creates an Azure Resource Manager lock on a designated Azure resource, resource group, or subscription. Azure supports two resource lock levels: CanNotDelete and ReadOnly.
-LockLevel CanNotDelete ensures that authorized users can read and modify the resource's configuration while strictly blocking any operation that deletes the resource.corpdata storage account without encountering authorization errors.-ResourceName "corpdata" along with -ResourceType "Microsoft.Storage/storageAccounts", the lock is scoped directly to the storage account rather than locking every item in the parent resource group.This command precisely implements a CanNotDelete lock on the specific storage account, satisfying both constraints: safeguarding the resource against deletion while permitting normal day-to-day administrative changes.