Hello @John ,
Thanks for your query !
Can you try out the script mentioned here in the article
Below piece of code validates and removes based upon the last modified date of the container
Below code goes one level deep i.e. along with container it also checks for the last modified date of the blob.
Based upon your requirements you can use either of those.
Before you run the code , I would suggest to comment the command "Remove-AzStorageAccount" and just do a write-host $StorageAccountName,$LastModified just for review and do a sample test from your end.
Couple of best practices:
Before you remove the storage account , try to enable "Soft Delete" feature set it for X number of days. So this way your data can be retained for those number of days
Also , you can recover the storage account if you feel the account was deleted unexpectedly . Use the article below
Happy Scripting and all the very best !
If the above answers helps you out , kindly don't forget to Upvote and Accept the Answer