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.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

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
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