你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzContainerGroupImageRegistryCredentialObject

为 ImageRegistryCredential 创建内存中对象

语法

Default (默认值)

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

说明

为 ImageRegistryCredential 创建内存中对象

示例

示例 1:设置映像注册表凭据以创建容器组

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

此命令设置映像注册表凭据以创建容器组

参数

-AcrIdentity

有权访问 ACR 的标识。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Password

专用注册表的密码。

参数属性

类型:SecureString
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Server

没有协议(如“http”和“https”)的 Docker 映像注册表服务器。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Username

专用注册表的用户名。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输出

ImageRegistryCredential