locked
SharePoint Online Break Inheritance All Subfolders of a Library RRS feed

  • Question

  • I am working with SharePoint Online powershell, and need to break inheritance of all subfolders of a library.  I tried something like this:

          

    $Web = Get-SPOSite "https://xxxx.sharepoint.com"
    $list = "Sample"
    $folders = $list.Folders
    foreach ($spFolder in $folders)
    {   

        $spFolder.BreakRoleInheritance($true, $true);        
        $spFolder.Update(); 

    }

    No luck?  Any assistance would be greatly appreciated.

    Tuesday, October 25, 2016 3:57 AM

All replies

  • Hi Lisa

    Check Below URL

    https://gallery.technet.microsoft.com/office/Break-inheritance-for-all-ded251fa

    http://sharepoint.stackexchange.com/questions/142388/sharepoint-online-stop-permissions-inheritance-on-the-list-via-powershell


    Mark it as an answer if it helped you out. Regards Rahul Dagar

    Tuesday, October 25, 2016 4:12 AM