New-CMDepTokenRequest

Creates an Apple DEP token reqeust.

Syntax

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

Description

The New-DepTokenRequest cmdlet requests a public certificate from Microsoft Intune that can be used to download an encrypted DEP token from the Apple Deployment Program portal. Apple uses the public token to encrypt the DEP token. You need to provide a Microsoft Intune organizational account by using the IntuneCredential parameter.

Examples

Example 1: Create a DEP token request

PS C:\> $SecPasswd = ConvertTo-SecureString "password" -AsPlainText -Force
PS C:\> $IntuneCreds = New-Object System.Management.Automation.PSCredential ("Username@CompanyName.onmicrosoft.com", $SecPasswd)
PS C:\> New-CMDepTokenRequest -IntuneCredential $IntuneCreds -Path "c:\test.pem"

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

The second command creates a PSCredential object that contains the Intune organizational account and the password stored in $SecPasswd. The command stores the PSCredential object in the $IntuneCreds variable.

The last command downloads a DEP token request using the Intune credentials stored in $IntuneCreds and stores the downloaded file at 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: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