kwizcom banner advertisement

Find All Office 365 Group Sites in SharePoint Online

Requirement: Get All Group Sites in SharePoint Online.

How to find all group-connected team sites in SharePoint Online?
The new SharePoint Online admin center lists all group sites and modern sites. You can login to SharePoint Online Admin Center >> Click on "Active Sites" and then look for "Primary Admin" Column which has "Group Admin" to get the list of all SharePoint Online group site collections.
find all group sites in sharepoint online


SharePoint Online: List Group Sites using PowerShell 
Run these lines of PowerShell script in SharePoint Online Management Shell.
#Set Admin Center URL
$AdminCenterURL = "https://crescent-admin.sharepoint.com/"

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

#Get All Group Sites
Get-SPOSite | Where { $_.Template -like 'GROUP*'} | Select URL

This gets you the list of all group sites!  

Get All Group Sites in SharePoint Online and Export to CSV:
Gets get a list of group sites and export the data to CSV file.
#Set Admin Center URL
$AdminCenterURL = "https://crescent-admin.sharepoint.com/"
$ReportOutput="C:\Temp\GroupSites.csv"

#Connect to SharePoint Online Admin Center
Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)

#Get All Group Sites
$GroupSites = Get-SPOSite -Limit All -Template 'GROUP#0' -IncludePersonalSite:$False
Write-host "Total Number of Group Sites Found:"$GroupSites.count

$SiteData = @()
#Loop throgh each site
ForEach($Site in $GroupSites)
{
    #Get Group Site Data
    $SiteData += New-Object PSObject -Property @{
                'Site Title' = $Site.Title
                'URL' = $Site.Url
                'Last Modified' = $Site.LastContentModifiedDate
                'StorageUsed' = $Site.StorageUsageCurrent              
                }
}
#Export the data to CSV
$SiteData | Export-Csv $ReportOutput -NoTypeInformation
Write-Host -f Green "Group Sites Data Exported to CSV!"
and the script output report:
sharepoint online list group sites
Find All Office 365 Group Sites in SharePoint Online Find All Office 365 Group Sites in SharePoint Online Reviewed by Salaudeen Rajack on November 23, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.