Edit

Share via


New-AzContainerGroupImageRegistryCredentialObject

Create a in-memory object for ImageRegistryCredential

Syntax

Default (Default)

New-AzContainerGroupImageRegistryCredentialObject
    -Server <String>
    [-Password <SecureString>]
    [-Username <String>]
    [-AcrIdentity <String>]
    [<CommonParameters>]

Description

Create a in-memory object for ImageRegistryCredential

Examples

Example 1: Set up an image registry credential to create a container group

$pwd = ConvertTo-SecureString -String "****" -AsPlainText -Force
New-AzContainerGroupImageRegistryCredentialObject -Server "myserver.com" -Username "username" -Password $pwd
Password          Server       Username
--------          ------       --------
****** myserver.com username

This command sets up an image registry credential to create a container group

Parameters

-AcrIdentity

The identity with access to the ACR.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Password

The password for the private registry.

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Server

The Docker image registry server without a protocol such as "http" and "https".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Username

The username for the private registry.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ImageRegistryCredential