Get-AzureRmStorageContainer
Gets or lists Storage blob containers
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmStorageContainer
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmStorageContainer
-StorageAccount <PSStorageAccount>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmStorageContainer 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-AzureRmStorageContainer -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-AzureRmStorageContainer -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-AzureRmStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount"
PS C:\>Get-AzureRmStorageContainer -StorageAccount $accountObject -ContainerName "myContainer"
This command gets a Storage blob container with Storage account object and container name.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Container Name
Type: | String |
Aliases: | N, ContainerName |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccount
Storage account object
Type: | PSStorageAccount |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccountName
Storage Account Name.
Type: | String |
Aliases: | AccountName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |