Cmdlet Reference¶
SPClean exports 16 cmdlets grouped by module and function.
Permission Hygiene & Orphaned Users¶
| Cmdlet | Type | Description |
|---|---|---|
| Connect-SPCTenant | Auth | Establish a SharePoint Online + Graph session |
| Disconnect-SPCTenant | Auth | Clear the module connection state |
| Get-SPCOrphanedUser | Scan | Scan sites and return orphaned user objects |
| Get-SPCPrivilegedUser | Scan | Get the top privileged users across the tenant |
| Get-SPCOverPermissionedUser | Scan | Identify users with excessive direct permission assignments |
| Get-SPCGuestAccess | Scan | List all external/guest users with access to a site |
| Get-SPCMismatchUser | Scan | Scan sites to identify User ID Mismatch issues |
| Repair-SPCMismatchUser | Remediate | Repair User ID Mismatch issues safely |
| Remove-SPCOrphanedUser | Remediate | Remove orphaned users from UILs and revoke direct permissions |
| Restore-SPCOrphanedUser | Remediate | Re-apply permissions from a JSON snapshot |
| Export-SPCReport | Report | Generate CSV, HTML, or JSON reports from scan results |
| New-SPCScanSchedule | Util | Register a Windows Scheduled Task for automated scans |
| Register-SPCLicense | Util | Validate and activate a license key |
| Get-SPCLicenseInfo | Util | Return the current license status |
Storage Optimization¶
| Cmdlet | Type | Description |
|---|---|---|
| Get-SPCStorageWaste | Scan | Discover and quantify storage waste across recycle bins, versions, and PHL |
| Get-SPCVersionWaste | Scan | Analyze document library version sprawl and calculate recoverable MB |
| Get-SPCPreservationHoldWaste | Scan | Audit Preservation Hold Library locked storage and alert levels |
| Get-SPCInactiveSite | Scan | Identify dormant/stale SharePoint sites and calculate cost avoidance |
| Clear-SPCRecycleBin | Remediate | Purge 1st & 2nd stage recycle bins safely with Purview hold protection |
| Optimize-SPCFileVersion | Remediate | Trim redundant historical versions and update library version limits |
| Export-SPCStorageReport | Report | Generate Executive HTML ROI Dashboards and CSV reports |
License requirements¶
| Feature | Free | Pro | Consultant |
|---|---|---|---|
| Permission Hygiene | |||
Get-SPCOrphanedUser, Get-SPCMismatchUser |
✅ | ✅ | ✅ |
Export-SPCReport -Format CSV\|JSON |
✅ | ✅ | ✅ |
Export-SPCReport -Format HTML |
— | ✅ | ✅ |
Remove-SPCOrphanedUser -CreateSnapshot |
— | ✅ | ✅ |
Restore-SPCOrphanedUser |
— | ✅ | ✅ |
New-SPCScanSchedule |
— | ✅ | ✅ |
| Storage Optimization | |||
Storage & Version Scans (Get-SPC*Waste, Get-SPCInactiveSite) |
✅ | ✅ | ✅ |
CSV Reports (Export-SPCStorageReport -Format CSV) |
✅ | ✅ | ✅ |
Simulation Modes (-DryRun / -WhatIf) |
✅ | ✅ | ✅ |
Executive HTML ROI Dashboard (Export-SPCStorageReport -Format HTML) |
— | ✅ | ✅ |
Live Recycle Bin Purge (Clear-SPCRecycleBin) |
— | ✅ | ✅ |
Live File Version Trimming (Optimize-SPCFileVersion) |
— | ✅ | ✅ |
White-Label Dashboard Branding (-CompanyLogoUrl, -ClientName) |
— | — | ✅ |
See Licensing for details and pricing.