New-AzContainerRegistry
Creates a container registry.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzContainerRegistry
[-ResourceGroupName] <String>
[-Name] <String>
[-Sku] <String>
[-Location <String>]
[-EnableAdminUser]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzContainerRegistry cmdlet creates a container registry.
Examples
Example 1: Create a container registry with a new storage account.
New-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -Sku "Basic"
Container registry location: eastus
Registry Name Sku LoginServer CreationDate Provisioni AdminUserE StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- ---------------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True
This command creates a container registry with a new storage account in the resource group `MyResourceGroup`.
Example 2: Create a container registry with admin user enabled.
New-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -Sku "Basic" -EnableAdminUser
Container registry location: eastus
Registry Name Sku LoginServer CreationDate Provisioni AdminUserE StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- ---------------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True
This command creates a container registry with admin user enabled.
Parameters
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable admin user for the container registry.
| Type: | SwitchParameter |
| Aliases: | EnableAdmin |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Container Registry Location. Default to the location of the resource group.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Container Registry Name.
| Type: | String |
| Aliases: | ContainerRegistryName, RegistryName, ResourceName |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Resource Group Name.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Container Registry SKU.
| Type: | String |
| Aliases: | ContainerRegistrySku, RegistrySku |
| Accepted values: | Basic, Classic, Premium, Standard |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Container Registry Tags.Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}
| Type: | Hashtable |
| Aliases: | Tags |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |