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
Default (Default)
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 [email protected] -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.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PfxPassword
Password for the .pfx certificate file.
Parameter properties
Type: | SecureString |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-PfxPath
Path to a .pfx certificate file.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-StoreName
Certificate StoreName
Parameter properties
Type: | String |
Default value: | None |
Accepted values: | CertificateAuthority, Root |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | 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.