Display SharePoint Site collection Administrators

This script displays all Site collection Administrators along with their email addresses for all web applications.

Get-SPSite | % {$_.RootWeb.SiteAdministrators} | select @{name='Url';expr={$_.ParentWeb.Url}}, LoginName, Email

If you are on WSS v.3/MOSS 2007 use the next defenition for Get-SPSite

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null
function Get-SPSite{
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
$farm.services | % {if($_.WebApplications.Count){$_.WebApplications}} | % {if($_.sites.Count){$_.sites}}

2 thoughts on “Display SharePoint Site collection Administrators

  1. Thanks so much! That worked perfectly. But I want to add the Site Title to the outcome as well. Which is actually ROOTWEB. Can this be done or does it need to be a separate command?
    I appreciate your quick response.

    1. Yes it can be done:) Could not test right now. Use one of these scripts.
      Get-SPSite | % {$_.RootWeb.SiteAdministrators} | select @{name=’Url’;expr={$_.ParentWeb.Url}}, @{name=’Title’;expr={$_.ParentWeb.Title}}, LoginName, Email
      Get-SPSite | % {$_.RootWeb.SiteAdministrators} | select @{name=’Url’;expr={$_.ParentWeb.Url}}, @{name=’Title’;expr={$_.ParentWeb.Name}}, LoginName, Email

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: