From be87797267f8eba5e5645e421d6f17248818d178 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Tue, 5 Nov 2024 18:10:01 -0500 Subject: [PATCH] Skip missing blob container properties --- eng/common/scripts/Helpers/Resource-Helpers.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/common/scripts/Helpers/Resource-Helpers.ps1 b/eng/common/scripts/Helpers/Resource-Helpers.ps1 index 5c30d3b9a7..e3a32848f4 100644 --- a/eng/common/scripts/Helpers/Resource-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Resource-Helpers.ps1 @@ -342,6 +342,9 @@ function RemoveStorageAccount($Account) { } foreach ($container in $containers) { + if (!($container | Get-Member 'ListBlobProperties')) { + continue + } if ($container.BlobContainerProperties.HasImmutableStorageWithVersioning) { try { # Use AzRm cmdlet as deletion will only work through ARM with the immutability policies defined on the blobs