Cleanup

Clean up resources

Remember to remove any newly created Azure resources that you no longer use. Removing unused resources ensures you will not incur unexpected costs.

  1. In the Azure portal, open the Cloud Shell by clicking the first icon in the top right of the Azure Portal. If prompted, click Reconnect.

  2. In the PowerShell session within the Cloud Shell pane, run the following to remove the delete lock:

    $storageaccountname = (Get-AzStorageAccount -ResourceGroupName AZ500LAB03).StorageAccountName
    
    $lockName = (Get-AzResourceLock -ResourceGroupName AZ500LAB03 -ResourceName $storageAccountName -ResourceType Microsoft.Storage/storageAccounts).Name
    
    Remove-AzResourceLock -LockName $lockName -ResourceName $storageAccountName  -ResourceGroupName AZ500LAB03 -ResourceType Microsoft.Storage/storageAccounts -Force
    
  3. In the PowerShell session within the Cloud Shell pane, run the following to remove the resource group:

    Remove-AzResourceGroup -Name "AZ500LAB03" -Force -AsJob
    
  4. Close the Cloud Shell pane.