New-CMApnsCertificateRequest

Creates an APNS certificate request.

Syntax

New-CMApnsCertificateRequest
   -IntuneCredential <PSCredential>
   [-OutputPath <String>]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-CMApnsCertificateRequest cmdlet downloads an Apple Push Notification Service (APNS) certificate signing request. You should upload this request (.csr) file to the Apple Push Certificates Portal in order to download an APN certificate. Provide a Microsoft Intune organizational account by using the IntuneCredential parameter.

Examples

Example 1: Create an APNS certificate signing request

PS C:\> $SecPasswd = ConvertTo-SecureString "P@ssW0rD!" -AsPlainText -Force
PS C:\> $MyCreds = New-Object System.Management.Automation.PSCredential ("UserName@CompanyName.onmicrosoft.com", $SecPasswd)
PS C:\> New-CMApnsCertificateRequest -IntuneCredential $MyCreds -Path "C:\Certificates\test.csr"

The first command converts the password into a secure string and stores the secure string in the $SecPasswd variable.

The second command creates a PSCredential object with the Microsoft Intune organizational account and the password stored in $SecPasswd. The command then stores the PSCredential object in the $MyCreds variable.

The last command downloads an APN certificate signing request (.csr) by using the Microsoft Intune credentials stored in $MyCreds, and saves the downloaded certificate signing request (.csr) file to the specified path.

Required Parameters

-IntuneCredential

Specifies a PSCredential object that contains a Microsoft Intune organizational account and password.

Type:PSCredential
Aliases:Credential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OutputPath
Type:String
Aliases:ApnsCertificateRequestPath, Path
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns the current working object. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False