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
 

Set-AzureStorageBlobContent

Set-AzureStorageBlobContent

microsoft.windowsazure.commands.storage.dll

Synopsis

Upload local file to azure storage blob.

Syntax

Set-AzureStorageBlobContent [-File] [-Container] [-Blob] [-BlobType] [-Properties] [-Metadata] [-Force] [-Context] [-ServerTimeoutPerRequest] [-ClientTimeoutPerRequest] [-ConcurrentTaskCount] [<CommonParameters>]

Set-AzureStorageBlobContent [-File] [-Blob] [-CloudBlobContainer] [-BlobType] [-Properties] [-Metadata] [-Force] [-Context] [-ServerTimeoutPerRequest] [-ClientTimeoutPerRequest] [-ConcurrentTaskCount] [<CommonParameters>]

Set-AzureStorageBlobContent [-File] [-ICloudBlob] [-BlobType] [-Properties] [-Metadata] [-Force] [-Context] [-ServerTimeoutPerRequest] [-ClientTimeoutPerRequest] [-ConcurrentTaskCount] [<CommonParameters>]

Detailed Description

Upload local file to azure storage blob.

Parameters

-File <String>

Local file path.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Container <String>

Container name

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Blob <String>

Blob name.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-BlobType <String>

Destination Blob Type (Block/Page).

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Properties <Hashtable>

Blob properties.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Metadata <Hashtable>

Blob metadata.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Force <SwitchParameter>

Force to overwrite the existing blob.

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]>

The total amount of concurrent async tasks.

Aliases

None

Required?

false

Position

named

Default value

ProcessorCount * 8

Accept pipeline input?

false

Accept wildcard characters?

false

-CloudBlobContainer <CloudBlobContainer>

CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ICloudBlob <ICloudBlob>

ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

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


Notes

Examples

-------------------------- Upload file by name. --------------------------

PS C:\> Set-AzureStorageBlobContent -Container upload -File .\filename -Blob blobname

-------------------------- Upload file using ls command. --------------------------

PS C:\> ls -File -Recurse | Set-AzureStorageBlobContent -Container upload

-------------------------- Upload file using pipeline from GetAzureStorageBlob --------------------------

PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Set-AzureStorageBlobContent -File filename

-------------------------- Upload file using pipeline from GetAzureStorageContainer --------------------------

PS C:\> Get-AzureStorageContainer -Container container* | Set-AzureStorageBlobContent -File filename -Blob blobname

-------------------------- Upload file and set metadata --------------------------

PS C:\> $meta = @{"key" = "value"; "name" = "test"}
Set-AzureStorageBlobContent -File filename -Container containername -Metadata $meta

Get-AzureStorageBlobContent
Get-AzureStorageBlob
Remove-AzureStorageBlob