Skip to content

Commit 131125b

Browse files
Update Get-AzStorageBlob.md (Azure#26112)
* Update Get-AzStorageBlob.md * Update Get-AzStorageBlob.md * Update Get-AzStorageBlob.md Made modifications to the PR based on the comments
1 parent fdbb30a commit 131125b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Storage/Storage.Management/help/Get-AzStorageBlob.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,21 @@ testblob BlockBlob 2097152 application/octet-stream 20
201201
This command gets a single blob with blob tag condition.
202202
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.
203203

204+
### Example 10: Get blob properties (example: ImmutabilityPolicy) of a single blob
205+
```powershell
206+
$blobProperties = (Get-AzStorageBlob -Container "ContainerName" -Blob "blob" -Context $ctx).BlobProperties
207+
$blobProperties.ImmutabilityPolicy
208+
```
209+
210+
```output
211+
ExpiresOn PolicyMode
212+
--------- ----------
213+
9/17/2024 2:49:32 AM +00:00 Unlocked
214+
```
215+
216+
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...
217+
To list multiple blobs (execute the cmdlet without blob name), use **ListBlobProperties.Properties** instead of **BlobProperties** for better performance.
218+
204219
## PARAMETERS
205220

206221
### -Blob

0 commit comments

Comments
 (0)