Remove-AzureStorageBlob
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Remove-AzureStorageBlob
Removes the specified storage blob.
Parameter Set: NamePipeline
Remove-AzureStorageBlob [-Blob] <String> [-Container] <String> [-Context <AzureStorageContext> ] [-DeleteSnapshot] [-Force] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: BlobPipeline
Remove-AzureStorageBlob -ICloudBlob <ICloudBlob> [-Context <AzureStorageContext> ] [-DeleteSnapshot] [-Force] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ContainerPipeline
Remove-AzureStorageBlob [-Blob] <String> -CloudBlobContainer <CloudBlobContainer> [-Context <AzureStorageContext> ] [-DeleteSnapshot] [-Force] [-PassThru] [-Confirm] [-WhatIf] [ <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.
Removes the specified blob from a storage account in Windows Azure.
-Blob<String>
Specifies the name of the blob you want to remove.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CloudBlobContainer<CloudBlobContainer>
Specifies a CloudBlobContainer object from the Windows Azure Storage Client library. You can use the Get-AzureStorageContainer cmdlet to get it.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Container<String>
Specifies the name of the container.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Context<AzureStorageContext>
Specifies the Windows Azure storage context. You can use the New-AzureStorageContext cmdlet to create it.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DeleteSnapshot
Specifies whether to delete all snapshots when the base blob is deleted. The default is to not delete blob snapshots.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Removes the blob and its snapshots without confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ICloudBlob<ICloudBlob>
Specifies an ICloudBlob object from the Windows Azure Storage Client library. You can use the Get-AzureStorageBlob cmdlet to get it.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PassThru
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
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.
Remove a storage blob by name
This example removes a blob identified by its name.
C:\PS>Remove-AzureStorageBlob -Container containername -Blob blobname
Remove a storage blob using the pipeline
This example uses the pipeline.
C:\PS>Get-AzureStorageBlob -Container containername -Blob blobname | Remove-AzureStorageBlob
Remove storage blobs using the pipeline
This example uses the asterisk (*) wildcard character and the pipeline to retrieve the blob or blobs and then removes them.
C:\PS>Get-AzureStorageContainer container* | Remove-AzureStorageBlob blobname