Clear-RDMActivityLogs
Synopsis
Clean up the activity logs before the specified date
Syntax
__AllParameterSets
Clear-RDMActivityLogs -Before <datetime> [-Scope <DeleteHistoryScope>] [-Filename <string>]
[-IncludeAdministrationLogs] [-NoClobber] [-ForcePromptAnswer <DialogResult[]>] [-WhatIf]
[-Confirm] [<CommonParameters>]Description
Clean up the activity logs based before the specified date on the specified scope. By using the 'Filename' parameter, a backup file will be generated. To use this cmdlet, the user must be a vault owner or an administrator. In the last case, the scope can be larger such as all vaults.
Examples
PS C:\> $date = Get-Date -Date 2024/01/01
PS C:\> Clear-RDMActivityLogs -Before $date -Scope AllVaults -Filename 'C:\my\path\backup-activitylogs-prior-2024.xml'Clean up the activity logs prior to the year 2024 for all entries of the current vault and backup the deleted logs in the specified file
Parameters
-Before
Delete everything prior to this date
-Confirm
Prompts you for confirmation before running the cmdlet.
-Filename
XML backup deleted logs file. If not used, no backup will be generated.
-ForcePromptAnswer
Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:
Yes: Accept the prompt. Cover the OK and Automatic value.
No: Refuse the yes/no/cancel prompt. "Cancel" is the fallback option if there is no "No" option.
Cancel: Cancel the yes/no/cancel prompt. "No" is the fallback option if there is no "Cancel" option.
-IncludeAdministrationLogs
Include administration logs. The workspace must support the administration logs and the user must be an administrator.
-NoClobber
NoClobber prevents an existing file from being overwritten and displays a message that the file already exists. By default, if a file exists in the specified path, it is overwritten.
-Scope
Scope if the workspace supports vaults
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Notes
For more information, type "Get-Help Clear-RDMActivityLogs -detailed". For technical information, type "Get-Help Clear-RDMActivityLogs -full".
Last updated
Was this helpful?