Get-EnrollmentServiceLog

2/9/2009

The Get-EnrollmentServiceLog cmdlet 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-EnrollmentServiceLog cmdlet returns the most recent log entries.

Syntax

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

Parameters

The following describes the Get-EnrollmentServiceLog cmdlet 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-EnrollmentServiceLog cmdlet accepts a string in the pipeline that specifies the operationId, or an object that has the operationId property.

Output Type

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

Examples

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

C:\PS>Get-EnrollmentServiceLog

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

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

Reference

Remove-EnrollmentServiceLog