Get All SharePoint Online Sites using PowerShell 

Get All SharePoint Online Sites using PowerShell

Sites are the root component of SharePoint. Sites can be created directly or by creating new teams or private channels in Microsoft Teams. Listing all sites and subsites in SPO is essential for maintaining a clear site structure and ensuring effective organization. This blog helps you find and export all the SharePoint Online site collections and their details using PowerShell.

You can use the Get-SPOSite cmdlet to retrieve a list of all site collections in the tenant. Before proceeding with the cmdlets, you must connect to the SharePoint Online PowerShell module.

After connecting to SharePoint Online, run the following cmdlet to view all site collections in SharePoint Online.

Get-SPOSite | ft Title,Url,Template,StorageQuota,LastContentModifiedTime,Owner  

The above cmdlet lists all the SharePoint Online site collections, along with the Site Id, Site Template, Storage Quota, Site Owner, etc.

Get all SharePoint Online site id

To export all the SharePoint Online site collections with specified properties, run the cmdlet as shown below.

Get-SPOSite | Select Title,Url,Template,StorageQuota | Export-Csv ./AllSPOSites.csv -NoTypeInformation  

To get specific site details, execute the Get-SPOSite cmdlet with site id (I.e., site URL).

Get-SPOSite -Identity <site url> | select *

The above cmdlet shows 50+ properties of a site, including Site Id, Site Owner, Lock State, Sharing Capability, Storage Quota, Warning Quota, etc. You can view the required properties by mentioning them under the select filter.

export all sharepoint online site collections

You can also view all the SharePoint Online sites in the Grid view. It will be handy to filter, customize columns, sort rows, copy and paste data.

Get-SPOSite | Select Title,Url,Template,StorageQuota,LastContentModifiedDate,LockState,SharingCapability,Owner | Out-GridView 

get site details

Seamlessly Manage SharePoint Online Sites with AdminDroid

Effective monitoring of SharePoint site activities is vital for organizations to ensure compliance and security. While utilizing PowerShell scripts may seem like a straightforward approach, it may not always be efficient. This method can be time-consuming and complex, leading to limitations in accessing detailed information.

Fortunately, AdminDroid offers a comprehensive solution through its SharePoint Online site creation report. This report presents detailed graphical representations, including bar charts and graphs, displaying the daily site creation count, web templates used (such as Teams site or communication site), the last item modified date, and the number of site users.

SharePoint Online Sites

Additionally, AdminDroid provides several other reports pertaining to site activities, which include:

SharePoint Online Sites Reports

  • All SharePoint sites
  • Recently created Sites
  • Sites without recycle Bin
  • Site sharing configurations
  • Site with custom permission
  • Project web app sites

Inactive Sites

  • By Last Change Time
  • By Last File Activity
  • By Last Page View

Site Users

  • SPO users by sites
  • SPO site admins
  • SPO site owners
  • Site access guest users

Site Groups

  • SPO groups by sites
  • Security groups by sites
  • Empty SPO groups by sites
  • SPO group members

Site Usage Summary

  • Daily Active File Counts
  • Daily Active Site Counts
  • Daily Site Storage

AdminDroid’s SharePoint Online reporting tool empowers admins by providing insights about site collection, site groups, inactive SPO sites and users, SPO lists, libraries, etc. Furthermore, by utilizing AdminDroid’s SharePoint Online management tool, you can generate insightful reports and dashboards that provide detailed information about user behavior, site popularity, external file sharing, site storage consumption, and more.

But that’s not all! AdminDroid goes above and beyond by offering more than 1800 comprehensive reports and over 30 dashboards for various other Office 365 services. Additionally, it provides a range of free Azure AD reports, enabling organizations to efficiently manage users, groups, licenses, and user login activities. Choose AdminDroid to access advanced reporting features and streamline your SharePoint Online management tasks effectively. 🚀✨

This blog will be helpful to get SharePoint Online sites and their properties. If you have any scripting requirements, share them with us through the comment section. We are happy to help!

Get All SharePoint Online Sites using PowerShell 

by Kathy time to read: 2 min