Get-PnPAzureCertificate
SYNOPSIS
Get PEM values and manifest settings for an existing certificate (.pfx) for use when using CSOM via an app-only ADAL application.
See https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions for a sample on how to get started.
KeyCredentials contains the ADAL app manifest sections.
Certificate contains the PEM encoded certificate.
PrivateKey contains the PEM encoded private key of the certificate.
SYNTAX
Get-PnPAzureCertificate -Path <String> [-Password <SecureString>]
DESCRIPTION
Allows to PEM values and manifest settings for an existing certificate (.pfx) for use when using CSOM via an app-only ADAL application.
EXAMPLES
EXAMPLE 1
Get-PnPAzureCertificate -Path "mycert.pfx"
This will output PEM values and ADAL app manifest settings for the certificate mycert.pfx.
EXAMPLE 2
Get-PnPAzureCertificate -Path "mycert.pfx" -Password (ConvertTo-SecureString -String "YourPassword" -AsPlainText -Force)
This will output PEM values and ADAL app manifest settings for the certificate mycert.pfx which has the password YourPassword.
EXAMPLE 3
Get-PnPAzureCertificate -Path "mycert.cer" | clip
Output the JSON snippet which needs to be replaced in the application manifest file and copies it to the clipboard
PARAMETERS
-Password
Password to the certificate (*.pfx)
Type: SecureString
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Path to the certificate (*.pfx)
Type: String
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False