New-​Azure​Rm​Api​Management​Certificate

Creates an API Management certificate.

Syntax

New-AzureRmApiManagementCertificate
   -Context <PsApiManagementContext>
   [-CertificateId <String>]
   -PfxFilePath <String>
   -PfxPassword <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
New-AzureRmApiManagementCertificate
   -Context <PsApiManagementContext>
   [-CertificateId <String>]
   -PfxPassword <String>
   -PfxBytes <Byte[]>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

The New-AzureRmApiManagementCertificate cmdlet creates an Azure API Management certificate.

Examples

Example 1: Create and upload a certificate

PS C:\>New-AzureRmApiManagementCertificate -Context $ApiMgmtContext -PfxFilePath "C:\contoso\certificates\apimanagement.pfx" -PfxPassword "1111"

This command creates an API Management certificate and uploads it.

Required Parameters

-Context

Specifies a PsApiManagementContext object.

Type:PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PfxBytes

Specifies an array of bytes of the certificate file in .pfx format. This parameter is required if you do not specify the PfxFilePath parameter.

Type:Byte[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PfxFilePath

Specifies the path to the certificate file in .pfx format to create and upload. This parameter is required if you do not specify the PfxBytes parameter.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PfxPassword

Specifies the password for the certificate.

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

Optional Parameters

-CertificateId

Specifies the ID of the certificate to create. If you do not specify this parameter, an ID is generated for you.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

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

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCertificate