Update-AzureRmContainerRegistry

Updates a container registry.

Syntax

Update-AzureRmContainerRegistry
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-DisableAdminUser]
      [-EnableAdminUser]
      [-StorageAccountName <String>]
      [-Tag <Hashtable>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]
Update-AzureRmContainerRegistry
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-DisableAdminUser]
      [-EnableAdminUser]
      [-StorageAccountName <String>]
      [-Tag <Hashtable>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Update-AzureRmContainerRegistry cmdlet updates a container registry.

Examples

Example 1: Enable admin user for a specified container registry

PS C:\>Update-AzureRmContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -EnableAdminUser

Id                 : /subscriptions/3eb31d8d-2879-4706-89b4-4dc4047726c6/resourceGroups/MyResourceGroup/providers/Microsoft.ContainerRegistry/registries/MyRegistry
ResourceGroupName  : MyResourceGroup
Name               : MyRegistry
Type               : Microsoft.ContainerRegistry/registries
Location           : westus
Tags               : {}
SkuName            : Basic
SkuTier            : Basic
LoginServer        : myregistry.azurecr.io
CreationDate       : 4/13/2017 3:48:57 PM
ProvisioningState  : Succeeded
AdminUserEnabled   : True
StorageAccountName : myregistry154817

This command enables admin user for the specified container registry.

Example 2: Set the storage account used by a specified container registry

PS C:\>Update-AzureRmContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -StorageAccountName "mystorageaccount"

Id                 : /subscriptions/3eb31d8d-2879-4706-89b4-4dc4047726c6/resourceGroups/MyResourceGroup/providers/Microsoft.ContainerRegistry/registries/MyRegistry
ResourceGroupName  : MyResourceGroup
Name               : MyRegistry
Type               : Microsoft.ContainerRegistry/registries
Location           : westus
Tags               : {}
SkuName            : Basic
SkuTier            : Basic
LoginServer        : myregistry.azurecr.io
CreationDate       : 4/13/2017 3:48:57 PM
ProvisioningState  : Succeeded
AdminUserEnabled   : True
StorageAccountName : mystorageaccount

This command sets the specified container registry to use an existing storage account mystorageaccount in the same subscription.

Required Parameters

-EnableAdminUser

Enable admin user for the container registry.

Type:SwitchParameter
Aliases:EnableAdmin
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Container Registry Name.

Type:String
Aliases:ContainerRegistryName, RegistryName, ResourceName
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Resource Group Name.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableAdminUser

Enable admin user for the container registry.

Type:SwitchParameter
Aliases:DisableAdmin
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageAccountName

The name of an existing storage account.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tag

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
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry