Is there a PowerShell way that can give me list of owners for all the site collection and sub-sites from all the web applications in a given farm?

how to get list of users from OWNERS or designer group for all the site collections in a farm?

1 Answer 1


Please refer following powershell to get all site collection owners for each site collection in SharePoint farm:(Change the file location for yourself)

#Set file location for saving information. We'll create a tab separated file. 
$FileLocation = "C:\Temp\SiteCollectionOwnersReport.csv"
#Load SharePoint snap-in 
Add-PSSnapin Microsoft.SharePoint.PowerShell 
#Fetches webapplications in the farm 
$WebApplications = Get-SPWebApplication -IncludeCentralAdministration 
Write-Output "URL `t ID `t Site Collection Owner `t Site Collection Owner Email `t Site Collection Secondary Owner `t Site Collection Secondary Owner Email " | Out-file $FileLocation 
foreach($WebApplication in $WebApplications){ 
    #Fetches site collections list within sharepoint webapplication 
    Write-Output "" 
    Write-Output "Working on web application $($WebApplication.Url)" 
    $Sites = Get-SPSite -WebApplication $WebApplication -Limit All     
    foreach($Site in $Sites){      
            #Fetches information for each  site 
            Write-Output "$($Site.Url) `t $($Site.ID.Guid) `t $($Site.Owner.Name) `t $($Site.Owner.Email) `t $($Site.SecondaryContact.Name) `t $($Site.SecondaryContact.Email)" | Out-File $FileLocation -Append 
#Unload SharePoint snap-in 
Remove-PSSnapin Microsoft.SharePoint.PowerShell 
Write-Output "" 
Write-Output "Script Execution finished" 

Another article about all users in groups in a SharePoint farm.




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.