Cmdlet Reference¶
SPClean exports 9 cmdlets grouped by function.
| Cmdlet | Type | Description |
|---|---|---|
| Connect-SPCTenant | Auth | Establish a SharePoint Online + Graph session |
| Disconnect-SPCTenant | Auth | Clear the module connection state |
| Get-SPCOrphanedUser | Read | Scan sites and return orphaned user objects |
| Export-SPCReport | Report | Generate CSV, HTML, or JSON reports from scan results |
| Remove-SPCOrphanedUser | Write | Remove orphaned users from UILs and revoke direct permissions |
| Restore-SPCOrphanedUser | Write | Re-apply permissions from a JSON snapshot |
| 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 |
Typical workflow¶
Connect-SPCTenant
↓
Get-SPCOrphanedUser → Export-SPCReport
↓
Remove-SPCOrphanedUser (with -CreateSnapshot)
↓
Restore-SPCOrphanedUser (if rollback needed)
↓
Disconnect-SPCTenant
License requirements¶
| Feature | Free | Pro | Consultant |
|---|---|---|---|
Get-SPCOrphanedUser |
✅ | ✅ | ✅ |
Export-SPCReport -Format CSV\|JSON |
✅ | ✅ | ✅ |
Export-SPCReport -Format HTML |
— | ✅ | ✅ |
Remove-SPCOrphanedUser -CreateSnapshot |
— | ✅ | ✅ |
Restore-SPCOrphanedUser |
— | ✅ | ✅ |
New-SPCScanSchedule |
— | ✅ | ✅ |
See Licensing for details and pricing.