Skip to content
GitHub Action edited this page Jul 9, 2026 · 4 revisions

Usage

Parameters

Parameter Description
FileName Specifies the name of the configuration json file.
Clean Remove missing server side dependencies
HistoryRetentionDays Days of archived result snapshots to keep in Results\history (default 30; 0 disables pruning).
LogRetentionDays Days of transcript logs to keep in Logs (default 180; 0 disables pruning).

Basic Usage Example

Run the script with a specified configuration:

.\SPSCleanDependencies.ps1 -FileName 'CONTOSO-PROD-SPSE'

Clean Usage Example

Important

Backup content database first​ and test script on testing environment

Remove missing server side dependencies on SharePoint farm:

.\SPSCleanDependencies.ps1 -FileName 'CONTOSO-PROD-SPSE' -Clean

Next Steps

Clone this wiki locally