Editar

Compartir a través de


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.

Syntax

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

Description

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.

Examples

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.

Parameters

-DefaultProfile

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

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

-PfxPassword

Password for the .pfx certificate file.

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

-PfxPath

Path to a .pfx certificate file.

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

-StoreName

Certificate StoreName

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

Inputs

String

SecureString

Outputs

PsApiManagementSystemCertificate