Hello, I have a Site Collection with many subsites. Each subsite has a document library with the same name and would like to have the same unique permissions set.
To make it easy, the site collection is called Years
https://domain/sites/years/
subsites 2000, 2001...2016
so https://domain/sites/years/2016/Four Quarters/ there is a space (darn it) in each Document Library such as "Four Quarters"
Inherited permisisons should be be removed and then any permissiosn listed, should be removed and replaced with a few, such as "Domain Admins - Contribute" and "Domain Users - Read" for instance, on each Document Library (only one in each subsite).
I do NOT need to use something like this PowerShell below, however it MAY be helpful. I do NOT know PowerShell and I saw this and wondered if it might help with getting the subsites, however, after that I don't know how to get the Document Library and then set the permissions.
start-transcript c:\PowerShellScripts\Proposals\dailyProposalstranscript.txt
rm c:\PowerShellScripts\Proposals\allsites.txt
rm c:\PowerShellScripts\Proposals\allsitesnq.txt
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Get-SPsite -identity https://WebApplicationqa/depts/SiteCollection/ | get-spweb -Limit All | select url | export-csv -path c:\PowerShellScripts\Proposals\allsites.txt -NoTypeInformation
Get-Content c:\PowerShellScripts\Proposals\allsites.txt | % {$_ -replace '"', ""} | Set-Content c:\PowerShellScripts\Proposals\allsitesnq.txt
Get-Content c:\PowerShellScripts\Proposals\allsitesnq.txt | Where { $_ -Match "https://WebApplicationqa/depts/SiteCollection/" } | Set-Content c:\PowerShellScripts\Proposals\allsites.txtThank you! Please let me know (obviously) if I need more information or if this isn't clear.
a site collection with subsites all with the same named document library need unique permissions set on it, there are permissions already on it, and they need to be removed and specific permissions applied for each subsite's Document Library named "xyz"