The Remove-EnrollmentServiceLogcmdlet removes operational log entries from the Enrollment service database.
If you specify an end date, the Remove-EnrollmentServiceLogcmdlet only removes log entries created before the specified date. If you do not specify any parameters, the Remove-EnrollmentServiceLogcmdlet removes no log entries.
Syntax
Remove-EnrollmentServiceLog [-EndDate <DateTime>] [-WriteToFile <String>] [-WhatIf] [-Confirm] [<CommonParameters>]  | 
Parameters
The following describes the Remove-EnrollmentServiceLogcmdlet parameters.
- EndDate <DateTime>
 - 
Specifies the latest operational log entry to remove from the database. The cmldet removes log entries before this date and time. If you do not specify a time, 00:00:00 (midnight) is the default setting.
 
- WriteToFile <String>
 - 
Specifies the file path to which the cmdlet writes the deleted operation log entries, in comma-delimited text file (.csv) format. If the file does not exist, the cmdlet will create it. If the file already exists, the cmdlet will overwrite it.
 
- 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
None
Output Type
None
Examples
This Remove-EnrollmentServiceLogcommand example removes all Enrollment service log entries before January 14, 2007, and writes the deleted entries into the .csv file, archive.csv.
 Copy Code
 | 
|
|---|---|
C:\PS>Remove-EnrollmentServiceLog -enddate "1/14/07" -writetofile archive.csv  | 
|
Cmdlet Help
To view this information online, at the MDM Shell prompt, type:
get-help Remove-EnrollmentServiceLog -detailed, or get-help Remove-EnrollmentServiceLog -full
See Also