Created
February 12, 2016 07:47
-
-
Save aflyen/b4c68ca5f98baf745911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration | |
$WebUrl = "http://teams.contoso.com/sites/team1" | |
$SiteAdminGroup = "CONTOSO\ContosoSiteAdmins" | |
# Set the AD group as site collection administrator | |
$Web = Get-SPWeb $WebUrl | |
$SiteAdminUser = $Web.EnsureUser($SiteAdminGroup) | |
$SiteAdminUser.IsSiteAdmin = $true | |
$SiteAdminUser.Update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi aflyen,
THis is exactly what I'm looking for! Having a Role-Based Delegation Model in place is a better way to grant/deny sysadmin rights to a site.
I'm unfamiliar with the cmldet Get-SPWeb. I did find a Get-SPOWebTemplate (guessing it's not the same).
Could you give me a link where I can find this cmdlet? Thanks
Rg./Irwin