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.
Ubuntu 16.04 is going End Of Life at the end of April 2021, so without a paid-for subscription there won’t be any new security updates. We can use a couple of methods in PowerShell to list affected VMs in a tenancy.