From 131125bd5011ed4ab68e76066eaa624bb3c50eb4 Mon Sep 17 00:00:00 2001 From: VigneshB-Microsoft <149112552+VigneshB-Microsoft@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:45:41 -0700 Subject: [PATCH] Update Get-AzStorageBlob.md (#26112) * Update Get-AzStorageBlob.md * Update Get-AzStorageBlob.md * Update Get-AzStorageBlob.md Made modifications to the PR based on the comments --- .../Storage.Management/help/Get-AzStorageBlob.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlob.md b/src/Storage/Storage.Management/help/Get-AzStorageBlob.md index 1fdffc38fd5e..240d2c39f62b 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlob.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlob.md @@ -201,6 +201,21 @@ testblob BlockBlob 2097152 application/octet-stream 20 This command gets a single blob with blob tag condition. The cmdlet will only success when the blob contains a tag with name "tag1" and value "value1", else the cmdlet will fail with error code 412. +### Example 10: Get blob properties (example: ImmutabilityPolicy) of a single blob +```powershell +$blobProperties = (Get-AzStorageBlob -Container "ContainerName" -Blob "blob" -Context $ctx).BlobProperties +$blobProperties.ImmutabilityPolicy +``` + +```output +ExpiresOn PolicyMode +--------- ---------- +9/17/2024 2:49:32 AM +00:00 Unlocked +``` + +This example command gets the immutability property of a single blob. You can get a detailed list of blob prTooperties from the **BlobProperties** property, including but not limited to: LastModified, ContentLength, ContentHash, BlobType, LeaseState, AccessTier, ETag, ImmutabilityPolicy, etc... +To list multiple blobs (execute the cmdlet without blob name), use **ListBlobProperties.Properties** instead of **BlobProperties** for better performance. + ## PARAMETERS ### -Blob