Remove-EnrollmentServiceLog
2/9/2009
The Remove-EnrollmentServiceLog cmdlet removes operational log entries from the Enrollment service database.
If you specify an end date, the Remove-EnrollmentServiceLog cmdlet only removes log entries created before the specified date. If you do not specify any parameters, the Remove-EnrollmentServiceLog cmdlet removes no log entries.
Syntax
Remove-EnrollmentServiceLog [-EndDate <DateTime>] [-WriteToFile <string>] [-confirm] [-whatif] [<CommonParameters>]
Parameters
The following describes the Remove-EnrollmentServiceLog cmdlet 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. If the value contains a space or other special characters, enclose the string in quotation marks.
- 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. If the value contains a space or other special characters, enclose the string in quotation marks.
- 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
None
Examples
This Remove-EnrollmentServiceLog command example removes all Enrollment service log entries before January 14, 2007, and writes the deleted entries into the .csv file, archive.csv.
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