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

New-AzApiManagementSystemCertificate

Creates an instance of PsApiManagementSystemCertificate. The certificate can be issued by private CA's and will be installed on the API Management service into CertificateAuthority or Root store.

语法

Default (默认值)

New-AzApiManagementSystemCertificate
    -StoreName <String>
    -PfxPath <String>
    [-PfxPassword <SecureString>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

说明

The New-AzApiManagementSystemCertificate cmdlet is a helper command that creates an instance of PsApiManagementSystemCertificate. This command is used with the New-AzApiManagement and Set-AzApiManagement cmdlet.

示例

Example 1: Create and initialize an instance of PsApiManagementSystemCertificate using an Ssl Certificate from file

$rootCa = New-AzApiManagementSystemCertificate -StoreName "Root" -PfxPath "C:\contoso\certificates\privateCa.cer"
$systemCert = @($rootCa)
New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -Organization Contoso -AdminEmail admin@contoso.com -SystemCertificateConfiguration $systemCert

This command creates and initializes an instance of PsApiManagementSystemCertificate with a root CA certificate. It then creates and API Management service which installs the CA cert to the Root store.

参数

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

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

-PfxPassword

Password for the .pfx certificate file.

参数属性

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

参数集

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

-PfxPath

Path to a .pfx certificate file.

参数属性

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

参数集

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

-StoreName

Certificate StoreName

参数属性

类型:String
默认值:None
接受的值:CertificateAuthority, Root
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值: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.

输入

String

SecureString

输出

PsApiManagementSystemCertificate