11/11/2008

The Remove-EnrollmentRequestcmdlet removes a pending enrollment request for a Windows Mobile device.

You can determine the enrollment request by device, owner, or enrollment ID. If the command finds a single matching record, it removes the pending enrollment request. If the command finds multiple matching records, an error message displays and the command removes no records.

If you call this cmdlet without parameters, the Remove-EnrollmentRequestcmdlet removes all expired records from the database.

Syntax

Remove-EnrollmentRequest [[-Name] <String>] [-Owner
<AdUserParameter>] [-EnrollmentId <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Parameters

The following describes the Remove-EnrollmentRequestcmdlet parameters.

Name <String>

Specifies the distinguished name, DNS host name, or the common name of the Windows Mobile device.

Owner <AdUserParameter>

Specifies the common name, e-mail address, distinguished name, security ID (SID), or Logon ID of the owner of the Windows Mobile device. This owner must exist in Active Directory, or, if you specify a null value, the cmdlet uses the owner name, Anonymous.

EnrollmentId <String>

Specifies the identity string that is used to enroll the Windows Mobile device. If you specify a null value, the cmdlet uses the e-mail name of the owner. If an e-mail name is not available, the cmdlet uses the logon ID. If the Ownerparameter is null, the cmdlet uses the word Anonymous for this parameter.

WhatIf

Informs you of what changes would be made if the action were to be performed (the cmdlet is not executed).

Confirm

Prompts you for confirmation before the cmdlet executes.

CommonParameters

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, at the Mobile Device Manager (MDM) Shell prompt, type, get-help about_commonparameters.

Input Type

The Remove-EnrollmentRequestcmdlet accepts a string through the pipeline that identifies a Windows Mobile device, or an object that has the properties name, owner, or enrollmentId.

Output Type

The Remove-EnrollmentRequestcmdlet returns an EnrollmentRequestobject. To see all the properties for the EnrollmentRequestobject, at the MDM Shell prompt, type Get-EnrollmentRequest | Get-Member.

Examples

This Remove-EnrollmentRequestcommand example removes a pending enrollment request for the Windows Mobile device, Device1.

Copy Code
C:\PS>Remove-EnrollmentRequest -identity Device1

This Remove-EnrollmentRequestcommand example searches for all the pending enrollment requests for the owner, Mikael Sandberg. If there is only one pending request, the Remove-EnrollmentRequestcommand removes the pending enrollment request. If there is more than one request, an error message displays and the Remove-EnrollmentRequestcommand removes no requests.

Copy Code
C:\PS>Remove-EnrollmentRequest -owner "Mikael Sandberg"

This Remove-EnrollmentRequestcommand example removes all expired enrollment requests.

Copy Code
C:\PS>Remove-EnrollmentRequest

Cmdlet Help

To view this information online, at the MDM Shell prompt, type:

get-help Remove-EnrollmentRequest -detailed, or get-help Remove-EnrollmentRequest -full

See Also