The Get-EnrollmentServiceLogcmdlet returns operational log entries from the Enrollment service database.

You can limit the log entries returned by specifying the operation type, and start and end dates. If you do not specify any parameters, the Get-EnrollmentServiceLogcmdlet returns all log entries.


Get-EnrollmentServiceLog [[-Type] <String>] [-StartDate
<DateTime>] [-EndDate <DateTime>]


The following describes the Get-EnrollmentServiceLogcmdlet parameters.

Type <String>

Specifies the operation type to return. Possible values are Bootstrapping, Enroll, UnEnroll, AddEnrollmentRequest, RemoveExpiredEnrollmentRequest, RemoveNonExpiredEnrollmentRequest, DuplicatedDeviceId, and FailedToRemoveDeviceAccount.

StartDate <DateTime>

Specifies the earliest operational log to return. The cmdlet ignores log entries before this date and time. If you do not specify a time, 00:00:00 (midnight) is the default setting.

EndDate <DateTime>

Specifies the latest operational log to return. The cmdlet ignores log entries after this date and time. If you do not specify a time, the value DateTime.Now is used.


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 Get-EnrollmentServiceLogcmdlet accepts a string in the pipeline that specifies the operationId, or an object that has the operationIdproperty.

Output Type

The Get-EnrollmentServiceLogcmdlet returns a collection of EnrollmentServiceLogobjects. To see all the properties for this object, at the MDM Shell prompt, type Get-EnrollmentServiceLog | Get-Member.


This Get-EnrollmentServiceLogcommand example returns all the current Enrollment service operational logs.

Copy Code

This Get-EnrollmentServiceLogcommand example returns the logs of all the new enrollment requests created between the hours of 9:00 and 17:00 on January 14, 2006.

Copy Code
C:\PS>Get-EnrollmentServiceLog -type AddEnrollmentRequest
-startdate "1/14/06 9:00 am" -enddate "1/14/06 5:00 pm"

Cmdlet Help

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

get-help Get-EnrollmentServiceLog -detailed, or get-help Get-EnrollmentServiceLog -full

See Also