Skip to content

Commit

Permalink
Update Get-AzStorageBlob.md (Azure#26112)
Browse files Browse the repository at this point in the history
* Update Get-AzStorageBlob.md

* Update Get-AzStorageBlob.md

* Update Get-AzStorageBlob.md

Made modifications to the PR based on the comments
  • Loading branch information
VigneshB-Microsoft authored Sep 24, 2024
1 parent fdbb30a commit 131125b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Storage/Storage.Management/help/Get-AzStorageBlob.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 131125b

Please sign in to comment.