< Back

New-AzureRmContainerRegistry

Tue Jan 29, 2019 9:40 pm

NAME New-AzureRmContainerRegistry



SYNOPSIS

Creates a container registry.





SYNTAX

New-AzureRmContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-Sku] {Basic} [-EnableAdminUser] [-Location <String>]

[-StorageAccountName <String>] [-Tag <Hashtable>] [-Confirm] [-WhatIf] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]





DESCRIPTION

The New-AzureRmContainerRegistry cmdlet creates a container registry.





PARAMETERS

-EnableAdminUser [<SwitchParameter>]

Enable admin user for the container registry.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Location <String>

Container Registry Location. Default to the location of the resource group.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Container Registry Name.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Resource Group Name.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Sku <String>

Container Registry SKU. Allowed values: Basic.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StorageAccountName <String>

The name of an existing storage account.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Tag <Hashtable>

Container Registry Tags.Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry







NOTES









Example 1: Create a container registry with a new storage account.



PS C:\\>New-AzureRmContainerRegistry -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.



PS C:\\>New-AzureRmContainerRegistry -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.





Example 3: Create a container registry with an existing storage account.



PS C:\\>New-AzureRmContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -Sku "Basic" -StorageAccountName "mystorageaccount"



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 an existing storage account `mystorageaccount` in the same subscription.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... erregistry

Get-AzureRmContainerRegistry

Update-AzureRmContainerRegistry

Remove-AzureRmContainerRegistry