Remove-AzResourceLock

In this Azure PowerShell article, we will discuss the syntax and usage of the Remove-AzResourceLock Azure PowerShell cmdlet with examples.

Remove-AzResourceLock

Remove-AzResourceLock is the PowerShell command that you can use to remove a lock from an Azure resource.

Syntax

Below is the syntax of the Remove-AzResourceLock Azure PowerShell cmdlet.

Remove-AzResourceLock
      -LockName <String>

      -ResourceGroupName <String>

Example

Below Azure PowerShell cmdlet will remove the lock named as “TsInfoWebSiteLock”.

Remove-AzResourceLock -LockName "TsInfoWebSiteLock" -ResourceGroupName MyNewResGrp -ResourceName 'TsInfoweb' -ResourceType "microsoft.web/sites"

After executing the above PowerShell command, I got the below popup to confirm the deletion process. Then I clicked on the Yes button to confirm.

Remove-AzResourceLock PowerShell

Then I got the output as “True” and the Resource lock has been deleted successfully. You can see the output as below.

Remove-AzResourceLock

To verify that, Again I tried executing the PowerShell command, I got the output as resource not found. You can check that on the below screen shot.

Remove-AzResourceLock The resource lock could not be found

You may also like following the below articles

Wrapping Up

Well, In this Azure article, we discussed the syntax and usage of Remove-AzResourceLock Azure PowerShell cmdlet with examples. Thanks for reading this article !!!