Get-AzureStorageBlob

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Get-AzureStorageBlob

List blobs in a container.

Parameter Set: BlobName
Get-AzureStorageBlob [[-Blob] <String> ] [-Container] <String> [-Context <AzureStorageContext> ] [ <CommonParameters>]

Parameter Set: BlobPrefix
Get-AzureStorageBlob [-Container] <String> [-Context <AzureStorageContext> ] [-Prefix <String> ] [ <CommonParameters>]

This topic describes the cmdlet in the .6.19 version of the Windows Azure PowerShell module. To find out the version of the module you're using, from the Windows Azure PowerShell console, type (get-module azure).version.

List the blobs in the specified container in a Windows Azure storage account.

-Blob<String>

Specifies a name or name pattern, which can be used for a wildcard search. If no blob name is specified, the cmdlet lists all the blobs in the specified container. If a value is specified for this parameter, the cmdlet lists all blobs whose name matches the string. For example, if ‘My’ is specified and the container includes blobs named ‘My’, ‘MyBlob1’, and ‘MyBlob2’, the cmdlet lists ‘My’. However, if you specify ‘My*’, the cmdlet lists ‘My’, ‘MyBlob1’, and ‘MyBlob2’.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Container<String>

Specifies the name of the container.

Aliases

N,Name

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Context<AzureStorageContext>

Specifies the Windows Azure storage account from which you want to get a list of blobs. You can use the New-AzureStorageContext cmdlet to create a storage account.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Prefix<String>

Specifies a prefix for the blob names you want to get. This parameter does not support using regular expressions or wildcards to search. This means that if the container has only blobs named ‘My’, ‘MyBlob1’, and ‘MyBlob2’ and you specify ‘-Prefix My*’, the cmdlet returns no blobs. However, if you specify ‘-Prefix My’, the cmdlet returns ‘My’, ‘MyBlob1’, and ‘MyBlob2’.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • AzureStorageBlob

    ICloudBlob object and Azure storage context.

Get a blob by blob name

This example uses a blob name and wildcard to get a blob.

C:\PS>Get-AzureStorageBlob -Container containername -Blob blob*

Get a blob by using the pipeline

This example uses the pipeline to get a blob.

C:\PS>Get-AzureStorageContainer container* | Get-AzureStorageBlob

Get a blob by name prefix

This example uses a name prefix to get a blob.

C:\PS>Get-AzureStorageBlob -Container containername -Prefix blob

Remove-AzureStorageBlob

Set-AzureStorageBlobContent

Get-AzureStorageBlobContent