Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $wUrl = "http://contoso/sites/ITS"
- $w = Get-SPWeb $wUrl
- $l = $w.Lists["Accomplishments"]
- $gr = $w.Groups["Accomplishments Viewers"]
- $readRole = $w.RoleDefinitions["Read"]
- $ra = new-object -TypeName "Microsoft.SharePoint.SPRoleAssignment" -ArgumentLis $gr
- $ra.RoleDefinitionBindings.Add($readRole)
- Write-Host -NoNewLine "Start "
- $l.Items | % {
- $_.RoleAssignments.Add($ra)
- $_.SystemUpdate($false)
- Write-Host -NoNewLine "."
- }
- Write-Host " done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement