Remove Azure Classic Blobs that are in Leased State “Leased” and Lease Status “Locked”

In this post I will post the PowerShell commands you can run to remove a blob file in an Azure Classic storage container that are in Leased State Leased and Lease Status Locked. There are some scripts out there to set all the files to Broken Lease State but this commands will only do it to one blob at the time.

Remove Blobs that are in Leased State Leased and Lease Status Locked 1

Picture 1: Shows a blob at Lease Status “Locked” and Lease State “Leased”.

Script to change the at Lease Status “Unlocked” and Lease State “Broken”.

Remove Blobs that are in Leased State Leased and Lease Status Locked 2

Picture 2: Shows a blob at Lease Status “Unlocked” and Lease State “Broken”.

To remove the blob with PowerShell one can run the following commands.

 

No comments yet.

Leave a Reply