Forum Discussion
Free, read-only PowerShell tool to find SharePoint oversharing before enabling Copilot
The first time I pointed my own tool at a tenant, it found three sites the whole company could open. A search center was one of them. Nobody had shared them on purpose. They came that way, and Copilot would have read every one.
That is the thing people ask before a Copilot rollout. What will it actually surface. Copilot only returns what a user can already open, so the real exposure is the broad access that was already there. The Everyone and Everyone except external users grants. The anonymous and organization-wide links nobody remembers making.
Microsoft has reports for this and they sit inside the paid SharePoint Advanced Management add-on. For teams without that license I put together a free open-source PowerShell module that answers the same question. Sharing it here in case it helps someone planning a rollout.
What it does
- Get-EveryoneAccess finds every place the Everyone and EEEU claims grant access, on one site or the whole tenant.
- Get-OversharedContent finds the anonymous Anyone links and the organization-wide links. It reads them from the hidden SharingLinks groups instead of walking every file, so it stays quick on a big tenant.
- Invoke-CopilotReadinessAssessment runs both, scores the exposure out of 100, and writes an HTML readiness scorecard you can hand to your security team.
- Install Install-Module CopilotGovernance -Scope CurrentUser
It is read only. It reports, it never changes anything. It needs PowerShell 7 and PnP.PowerShell and your own Entra app client id, because PnP 3.x no longer ships its own sign-in app. It also reports coverage, so a site it could not read is flagged and never counted as clean.
Being upfront about the limits today. It scans each site and its lists, and subwebs are still on the roadmap. Links created as Flexible on the newer sharing experience can be under-counted, so pass -IncludeSpecific to review every link.
The module is on the PowerShell Gallery at powershellgallery.com/packages/CopilotGovernance and the code is on GitHub at github.com/gvijaikumar9/CopilotGovernance
Feedback and edge cases welcome. Happy to fix what people hit