May 17 2023 07:24 AM
All my SPO sites start company.sharepoint.com/, I'm trying to find out the total number of sites and subsites below that. So far I can't find anything which can show me a total number. Can anyone help please?
May 23 2023 12:15 PM
Hello @An_admin_123
you see the total number of sites in your SharePoint Admin Center.
The total number uf subsites are not available in an Admin Center. You need to use a Third-Party Tool or PowerShell. Here are examples (I have this Scripts NOT tested): https://www.sharepointdiary.com/2017/05/get-all-site-collections-and-subsites-in-sharepoint-online-p...
Regards, Dave
Oct 27 2023 07:26 AM
Dec 14 2023 03:03 AM
Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
$sites = Get-SPOSite -Limit All
$totalSites = $sites.Count
Write-Host "Total number of sites in the tenant: $totalSites"
Disconnect-SPOService
That gets me "12" which is definitely wrong. It's at least 100. It doesn't seem to be counting the subsites of subsites.