Hi
i want to remove the ManageSubWebs base permission from a Permission Level across all Site Collections within a web application. I figure Powershell is my best bet here, however although ive been able to figure out how to add base permissions to a permission
level:
$spSite = Get-SPSite "http://mydomain/sites/test2"
$spWeb = $spSite.RootWeb
$PermissionLevel = "MyCustomOwnerPermissionLevel"
$BasePermission = "ViewUsageData"
$roleDef = $spWeb.RoleDefinitions[$PermissionLevel]
$bps = $roleDef.BasePermissions
$roleDef.BasePermissions = "$bps", "$BasePermission"
$roleDef.Update()
$spWeb.Dispose()
$spSite.Dispose()
This adds the View Usage Data base permission to the MyCustomOwnerPermissionLevel permission level.
Now i need to figure out how to remove the ManageSubWebs base permission, and if you're feeling clever enough, doing so for every site collection within a web app. Any ideas?
Regards
Sergio Giusti
http://sergioblogs.blog.co.uk/
Whenever you see a reply and if you think is helpful, click "
Vote As Helpful". And whenever you see a reply being an answer to the question of the thread, click "
Mark As Answer".