Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Get-AzStorageBlob.md #26112

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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