Get-AzRmStorageContainer

Gets or lists Storage blob containers

Syntax

Get-AzRmStorageContainer
   [-ResourceGroupName] <String>
   [-StorageAccountName] <String>
   [-Name <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRmStorageContainer
   -StorageAccount <PSStorageAccount>
   [-Name <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzRmStorageContainer cmdlet gets or lists Storage blob containers

Examples

Example 1: Get a Storage blob container with Storage account name and container name

PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer"

This command gets a Storage blob container with Storage account name and container name.

Example 2: List all Storage blob containers of a Storage account

PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount"

This command lists all Storage blob containers of a Storage account with Storage account name.

Example 3: Get a Storage blob container with Storage account object and container name.

PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount"
PS C:\>Get-AzRmStorageContainer -StorageAccount $accountObject -ContainerName "myContainer"

This command gets a Storage blob container with Storage account object and container name.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Container Name

Type:String
Aliases:N, ContainerName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-ResourceGroupName

Resource Group Name.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-StorageAccount

Storage account object

Type:PSStorageAccount
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-StorageAccountName

Storage Account Name.

Type:String
Aliases:AccountName
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

String

PSStorageAccount

Outputs

Microsoft.Azure.Commands.Management.Storage.Models.PSContainer