Get All SharePoint Site Collection Owners (Primary/Secondary Site Collection Administrators)

Requirement is to find out owners of each SharePoint site collection in the environment.We needed this data to get approvals on critical changes and to inform site owners prior to maintenance windows.

Simple! Use STSADM command:
On SharePoint 2007 and above, STSADM command can be used to get primary owner details of site collections:
stsadm -0 enumsites -url <web-app-url>
stsadm -0 enumsites -url “” > SitesRpt.xml

This command enumerates all site collections and pulls site owner information. It also retrieves secondary owner, content database in which site collection exist and storage details of the site collection. Just open the generated XML file with Microsoft Excel.

Find Site Owners for All site collections using PowerShell:

Get-SPSite -Limit 'All' | select URL, Owner, SecondaryContact

For SharePoint 2007 Sites, The PowerShell script to get site Owners for all Site collections would be:


$WebAppUrl = "" #Read-Host "Enter Web Application URL:"
$rootSite = New-Object Microsoft.SharePoint.SPSite($WebAppUrl)

#Get the Web Application from Site Collection
$WebApp = $rootSite.WebApplication

foreach($site in $WebApp.Sites)
    Write-Host "$($Site.Url) - $($Site.Owner) : $($Site.Owner.Email)"

Get All Site Owners in SharePoint 2013/2016:

On SharePoint 2010 and above, we can retrieve owner information with a single line of code:

Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue

Get-SPWebApplication "" | Get-SPSite | foreach-object { Write-host $_.Url - $_.Owner.Email}

Get Me All Site Collections I Own:
This time, I had to find out all site collections a particular user owns. No worries, PowerShell is so powerful!

Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue

Get-SPSite -Filter {$_.Owner -EQ "Global\Salaudeen"} -limit 100

For SharePoint Site Collection Administrators report, Refer: Site Collection Administrators Report for All SharePoint Sites

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience to help others, through the real-world articles!

2 thoughts on “Get All SharePoint Site Collection Owners (Primary/Secondary Site Collection Administrators)

  • Salaudeen —

    This is my go-to site when I need to find or reinforce SharePoint info I’m not sure of. Thanks for sharing all of your hard work here.

    Quick question: how would I go about getting all of the site owners in the farm using the CSOM in PowerShell? Is that possible?

    • You mean for On-Premises? Yes, We can get site owners both for SharePoint on-premises and Online using CSOM! Just install CSOM assemblies for respective version and you can code it. Its also possible with PnP PowerShell.


Leave a Reply

Your email address will not be published. Required fields are marked *