Clean SPO Sharing Links – PowerShell PNP report CSV and auto remove

Wanted to demo how to report on SharePoint Online (SPO) Sharing Links across the full M365 Tenant. PowerShell script below will:

  • Register Entra App ID with PFX certificate for automation
  • Loop all SharePoint sites on the tenant.
  • Find all Sharing Links
  • Exclude system lists for CSV quality
  • Generated detailed CSV report
  • Automatically revoke and remove Sharing Links
  • Improve security posture and compliance
  • Reduce tenant risk and support tickets

Detailed video shows step by step how to run script and then use to clean tenant settings. Cheers.

VIDEO

POWERSHELL CODE

SCREENSHOTS

REFERENCES

Leave a Comment

Return to Top ▲Return to Top ▲