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

New-AzureRmApiManagementSystemCertificate

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.

Important

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

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

Description

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

Examples

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

PS C:\>$rootCa = New-AzureRmApiManagementSystemCertificate -StoreName "Root" -PfxPath "C:\contoso\certificates\privateCa.cer"
PS C:\>$systemCert = @($rootCa)
PS C:\>New-AzureRmApiManagement -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.

Parameters

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-PfxPassword

Password for the .pfx certificate file.

Type:SecureString
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-PfxPath

Path to a .pfx certificate file.

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

-StoreName

Certificate StoreName

Type:String
Accepted values:CertificateAuthority, Root
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

SecureString

Outputs

PsApiManagementSystemCertificate