Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Get-AzureStorageBlob

Get-AzureStorageBlob

microsoft.windowsazure.commands.storage.dll

Synopsis

List the azure blobs in the specified container.

Syntax

Get-AzureStorageBlob [-Blob] [-Container] [-MaxCount] [-ContinuationToken] [-Context] [-ServerTimeoutPerRequest] [-ClientTimeoutPerRequest] [-ConcurrentTaskCount] [<CommonParameters>]

Get-AzureStorageBlob [-Prefix] [-Container] [-MaxCount] [-ContinuationToken] [-Context] [-ServerTimeoutPerRequest] [-ClientTimeoutPerRequest] [-ConcurrentTaskCount] [<CommonParameters>]

Detailed Description

List the azure blobs in the specified container.

Parameters

-Blob <String>

Blob name pattern. If blob name is empty, this will list all the blobs in container. Otherwise, this will list the blobs whose name matched the name regular pattern.

Aliases

None

Required?

false

Position

0

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Container <String>

Container name

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-MaxCount <Nullable`1[Int32]>

The max count of the blobs that can return.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ContinuationToken <BlobContinuationToken>

Blob list continuation token.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Context <AzureStorageContext>

Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ServerTimeoutPerRequest <Nullable`1[Int32]>

Server side time out for each request.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ClientTimeoutPerRequest <Nullable`1[Int32]>

Client side time out for each request.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ConcurrentTaskCount <Nullable`1[Int32]>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Prefix <String>

Blob name prefix. The Prefix parameter don't support regular expression.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PipelineVariable <string>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type

AzureStorageBlob

Notes

SYNOPSIS

Examples

-------------------------- Get azure storage blob by blob name --------------------------

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

-------------------------- Get blob by pipeline from GetAzureStorageContainer --------------------------

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

-------------------------- Get azure storage blob by name prefix --------------------------

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

-------------------------- List all blobs with max count and continuation token. --------------------------

PS C:\> $maxReturn = 10000
$containerName = "abc"

$total = 0
$token = $null
do
{
	$blobs = Get-AzureStorageBlob -Container $containerName -MaxCount $maxReturn  -ContinuationToken $token 
	$total += $blobs.Count
	if($blobs.Length -le 0) { break;}
	$token = $blobs[$blobs.Count -1].ContinuationToken;
} 
while($token -ne $null)
echo "Total $total blobs in container $containerName"

Remove-AzureStorageBlob
Get-AzureStorageBlobContent
Set-AzureStorageBlobContent