Forum Discussion

Ivan54's avatar
Ivan54
Bronze Contributor
Jan 25, 2018

Need PowerShell Script to remove broken inheritance

Hi,

 

I'm having an issue with a specific document library in SharePoint Online that is being synced to a department.

This document library resides in a Classic SharePoint Site, turned into modern view manually.

For some reason every time a user creates a document or folder in that document library (through the Windows 10 v1709 Windows Explorer - OneDrive Sync) the permission inheritance on that file/folder is broken and only the CREATOR has permissions. Therefore nobody else sees those files and folders.

 

Now I need a PowerShell script that will remove all the broken inheritances from a specific document library in SharePoint Online. 

I've searched online, but only found scripts that seem to work with old SP onPrem solutions.

Resources