Adding mulitple site collection administrators to every site collection within a web application
I need to add a hand full of people that manage SharePoint to the site collection administrators group of every site collection in
the farm. I don't want to go into all the hundreds of site collections and manually do this. Is there a way to script it in an STSADM command or do this at the web application level?
July 12th, 2011 10:31am
Hi Jeff,
Have your tried STSADM Adduser command? Here a Technet
article on this.
stsadm.exe -o adduser -url URL -userlogin DOMAIN\User_Name -useremail
someone@example.com -role Site_Group_Name -username "Users Display Name"
-siteadmin
Hope this helps!BlueSky2010
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 1:43pm
This one's a prime candidate for Powershell as well, if you have it installed on your server(s). You can use PS to access a web application, and loop through all the site collections under it, setting up additional site collection admins.
- MMichael Mukalian | Jan 2010 - Dec 2010 MVP SharePoint Services | MCTS: MOSS 2007 Configuration | http://www.mukalian.com/blog
July 12th, 2011 2:29pm
Hi,
This is a very easy task you can carry out by using sharepoint object model.
You can write code into a console application and run it on your server.
Your code can be like this
SPSite site = new SPSite("Your Url");
SPWebApplication webApp = site.WebApplication;
SPSiteCollection sites = webApp.Sites;
foreach (SPSite site1 in sites)
{
//Add your code here
}
I hope this will help you out.
Thanks,
Rahul Rashu
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 3:24pm