10/17/2008

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

This cmdlet returns a maximum of 2000 log entries. You can filter 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 the most recent log entries.

Syntax

Get-EnrollmentServiceLog [[-Type] <string>] [-EndDate
<DateTime>] [-StartDate <DateTime>]
[<CommonParameters>]

Parameters

The following describes the Get-EnrollmentServiceLogcmdlet parameters.

Type <String>

Specifies the operation type to return. Possible values are Bootstrapping, Enroll, UnEnroll, AddEnrollmentRequest, RemoveExpiredEnrollmentRequest, RemoveNonExpiredEnrollmentRequest, 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. If the value contains a space or other special characters, enclose the string in quotation marks.

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. If the value contains a space or other special characters, enclose the string in quotation marks.

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

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.

Examples

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

Copy Code
C:\PS>Get-EnrollmentServiceLog

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