In my Azure Subscription...
Created a new Resource Group LOCK using Powershell for a CLASSIC Resource Group. New-AzureRmResourceLock -LockLevel CanNotDelete -LockName MYRG_DeleteLock -ResourceGroupName MYRG
I have a CLASSIC Stoage Account and a CLASSIC VM within this Resource Group. As expected, when I tried deleting the VM from the Azure Portal it PROTECTED the deletion and notified that "Failed to delete the VM".
But when I used the below POWERSHELL command it just deleted it BYPASSING the lock on the RESOURCE GROUP. Remove-AzureVM -DeleteVHD -ServiceName MYSERVICE -Name MYVM
Am I missing any steps?