0

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?

0

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 
            $Site.Dispose() 
    } 
} 
 
#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.

https://www.c-sharpcorner.com/blogs/get-all-users-in-a-sharepoint-20101316-farm-using-powershell-script

Reference:

https://gallery.technet.microsoft.com/office/Get-collection-owners-for-13336f43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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