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);        


    No luck?  Any assistance would be greatly appreciated.

    Tuesday, October 25, 2016 3:57 AM

All replies

  • Hi Lisa

    Check Below URL



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

    Tuesday, October 25, 2016 4:12 AM