SharePoint, Powershell, manage or change AD security group permission for subfolders

Brass Contributor

Good day!


I spend few hours searching for this but didnt find solutions for my requirements. Hope I would get a solution from experts like you which would drastically reduce my effort in making 1000s if clicks. 


I have a SP site with doc library associated with a teams channel 'Finance' The 'Finance' folder under the doc lib has folders named after each company. Probably around 60 or more. each folder has 17 folders. below is the high level path. 


Doc lib --> Finance --> Company --> content. 

AD group name: LI.Finance.Read and LI.Finance.Write


It is set in a way that if I add some one to the channel, they get access to the document lib. but those who dont need access to the channel, they get added to AD group. I can add someone directly to the private group of the channel and they would get the desired access, but I've automated the 'Teams'' general group to add/remove when they meet certain condition and looks like this is impacting and removing the members from the groups associated with private channels as well if they dont belong to the 'Team'. 


This has forced me to manage permission using AD if they dont belong to the parent Team and would need access to the doc lib of the private channel.  


Long story short, I need to change the permission from Read to Edit for all the folders of one specific AD group that are under the 'Company' folders but should be read only for the parent folders.  How do I do it using PowerShell? This will save 8 clicks per folder. Totally 8000+ clicks. 


Note: Those groups mentioned above gets RO access to Doc Lib, Finance and Company folders even if the group ends with 'write'. But get write access only at the folder level thats called 'content'. at all levels LI.Finance.Read gets only read so no problem with this. 


Apologies for the long write. Let me know if you need more details. BTW, I'm noob in PowerShell. 

1 Reply
Modifying permissions within a private channel's site/doc lib wouldn't be a supported scenario.