SharePoint group owner information
Hi Guys,
Is there any Powershell , SQL Query or STSADM command to find out all group owner name of all groups in sharepoint Farm.
Any help will be much appreciated.
Thanks & Regards,
Sam
August 18th, 2011 3:45pm
Hi Sam,
The group in SharePoint is in web level, to get group owner of all groups in SharePoint farm, you may consider using code in this situation.
I have a test in my local server, you can refer to it for more information:
foreach (SPWebApplication wa in SPWebService.ContentService.WebApplications)
{
foreach (SPSite sc in wa.Sites)
{
try
{
foreach (SPWeb web in sc.AllWebs)
{
foreach (SPGroup group in web.Groups)
{
Console.WriteLine("\nGroup Nmae: " + group.Name + " Group Owner:
" + group.Owner.ToString());
Console.ReadLine();
}
}
}
catch (Exception e)
{
Console.WriteLine("Exception occured: {0}\r\n{1}", e.Message, e.StackTrace);
}
finally
{
sc.Dispose();
}
}
}
Thanks,
Qiao Wei
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2011 7:28am