Locks can be used to prevent accidental deletion of Azure Resources. But what happens when you remove a lock to perform maintenance and forget to reapply it? Azure Automation and PowerShell can
be used to make sure locks are reapplied.
Taking a snapshot of a disk is often a useful precaution before making a big change to an Azure VM. However, it’s easy for them to get forgotten about and remain on
your account eating up budget. This PowerShell snippet will find old Snapshots in your subscription.