Articles → MICROSOFT AZURE → Apply Locks On The Resource Group Using Powershell And CLI In Azure
Apply Locks On The Resource Group Using Powershell And CLI In Azure
Resource Group
Click to Enlarge
PowerShell Script
New-AzResourceLock -LockName "mylock" -LockLevel "CanNotDelete" -ResourceGroupName "RG1111"
Output
Click to Enlarge
Apply Lock Using CLI
az group lock create --lock-type CanNotDelete -n rglock -g 'rg1111'