New-EnrollmentRequest

2/9/2009

The New-EnrollmentRequest cmdlet creates a new Windows Mobile device enrollment request.

If the specified device is not already enrolled, the New-EnrollmentRequest cmdlet creates a new enrollment record, generates an enrollment password, and calculates a session key. When this cmdlet is called, all expired enrollment records are removed from the database.

Syntax

New-EnrollmentRequest [-Name] <DeviceNameParameter> [-ActivateVPN] [-Container <ContainerIdParameter>] [-EnrollmentId <string>] [-Owner <AdUserParameter>] [-SendEmail] [-SendTo <string>] [-confirm] [-whatif] [<CommonParameters>]

Parameters

The following describes the New-EnrollmentRequest cmdlet parameters.

  • Name <DeviceNameParameter>
    Specifies the name for the new device to enroll. A valid device name is one to 15 characters long, begins with a letter, contains only alphanumeric characters (a to z; 0 to 9) or dashes (-), and is not the name of an existing Active Directory account or blocked device. Well-known terms (for example, NULL and Administrator) are reserved and will not be accepted. If the value contains a space or other special characters, enclose the string in quotation marks.
  • Container <ContainerIdParameter>
    Specifies the container in Active Directory in which to create the managed device. You do not need to specify this parameter if you are using the default organizational unit (OU), SCMDM Managed Devices (<instance name>). If the value contains a space or other special characters, enclose the string in quotation marks.
  • Owner <AdUserParameter>
    Specifies the common name, e-mail address, distinguished name, security ID (SID), or Logon ID of the device owner. This owner must exist in Active Directory, or, if you specify a null value, the cmdlet uses the owner name, Anonymous. If the value contains a space or other special characters, enclose the string in quotation marks.
  • EnrollmentId <String>
    Specifies an identity string to enroll the device. If you specify a null value, the cmdlet uses the e-mail alias of the owner. If an e-mail name is not available, the cmdlet uses the owner LogonID. If the owner parameter is null, the cmdlet uses the word, Anonymous for this parameter.
  • ActivateVPN
    Specifies whether the enrolled device connects to the company network by default through the virtual private network (VPN) connection to the gateway server. May be set to true, -ActivateVPN, or -ActivateVPN:$true; or false, -ActivateVPN:$false. The default is the value of the ActivateVPNbyDefault setting in the Enrollment service. This value takes precedence over ActivateVPNbyDefault. You can use the Get-EnrollmentConfig cmdlet to find the current value of ActivateVPNbyDefault.
  • SendEmail
    Specifies whether to send a new enrollment e-mail message to the owner of the device that you are enrolling. You can set this parameter to true, -SendEmail, or -SendEmail:$true; or false, -SendEmail:$false. The default setting is false. The cmdlet ignores this parameter if you specify SendTo.
  • SendTo <String>
    Specifies the e-mail address in which to send the new enrollment e-mail message. The default value is the e-mail address of the owner of the device that you are enrolling.
  • 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 MDM Shell prompt, type get-help about_commonparameters.

Input Type

None

Output Type

The New-EnrollmentRequest cmdlet returns an EnrollmentRequest object. To see all the properties for this object, at the MDM Shell prompt, type Get-EnrollmentRequest | Get-Member.

Examples

This New-EnrollmentRequest command example enrolls the device, device1, in the Active Directory organizational unit, yourOU.

C:\PS>New-EnrollmentRequest -Name device1 -Container yourOU

Cmdlet Help

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

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

See Also

Reference

Get-EnrollmentRequest
Remove-EnrollmentRequest