SharePoint Online: Get Site Owner using PowerShell

Requirement: Get SharePoint Online Site Owner using PowerShell

How to Identify Site Owner in SharePoint Online?
You can find site owner SharePoint Online from SharePoint Online Admin Center.
  • Sign in to SharePoint Online Admin Center (https://YourDomain-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx)
  • Select the site collection you wish to get site owner from the site collections list >> From the ribbon, Click on "Owners" and then "Manage Administrators. 
  • On the "Manage Administrators" dialog box, You'll get the site owner or primary site collection administrator.
    Get Site Owner in SharePoint Online using PowerShell

PowerShell to Get Site Owner in SharePoint Online:
Here is the SharePoint Online PowerShell to list site owners
#Variables for Admin Center & Site Collection URL
$AdminCenterURL = "https://crescenttech-admin.sharepoint.com/"
$SiteURL = "https://crescenttech.sharepoint.com/sites/marketing"

#Connect to SharePoint Online
Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)

#sharepoint online powershell get site owner
Get-SPOSite $SiteURL | Select Owner

Get Site Owner in SharePoint Online using PowerShell
Here is how to get site owners of all SharePoint Online sites.
$AdminCenterURL = "https://crescenttech-admin.sharepoint.com/"

#Connect to SharePoint Online
Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)

#Get Site owners of all site collections
Get-SPOSite -limit ALL | Select URL, Owner
This PowerShell script retrieves site owners from all site collections. If you want to change site owner, use: How to Change Site Owner in SharePoint Online using PowerShell?
get site owner sharepoint online powershell

You can export Site Owners information to CSV file as:
Get-SPOSite | Select URL, Owner | Export-CSV "C:\Temp\SiteOwners.CSV"

The site owner is automatically added as Site collection administrator of the site. If you want to get all site collection administrators, use: SharePoint Online: Get Site Collection Administrators using PowerShell
SharePoint Online: Get Site Owner using PowerShell SharePoint Online: Get Site Owner using PowerShell Reviewed by Salaudeen Rajack on February 08, 2018 Rating: 5

1 comment:

Please Login and comment to get your questions answered!

Powered by Blogger.