This blog helps you to retrive all Site Collections in SharePoint Online, using PowerShell method.
Steps
Steps
- Open SharePoint Management Shell.
- Copy the code given below and paste it.
- Run the code.
- ##########################
- #Script : Below Script will Get All Site Collections in Office 365 SharePoint Online
- #Author : Gowtham Rajamanickam
- #Date :16-03-2017
- #Version:1.0
- #########################
- #Before Run the Scritp you must load the Client Assembly files
- Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
- Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
- #Variables for Processing
- $AdminUrl = "https://gowthamr.sharepoint.com/"
- $UserName= "[email protected]"
- $Password = "Enter your Password here"
- $SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
- $Credentials = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $UserName, $SecurePassword
- Connect-SPOService -Url $AdminUrl -Credential $Credentials
- $SiteColl = Get-SPOSite
- foreach($Site in $SiteColl)
- {
- Write-host $Site.Url
- }
Was my blog helpful? Was any relevant content missing? If so, please let us know what's confusing or missing at the bottom of this page.
Thanks for reading my blog.
Thanks for reading my blog.

Umesh MurumkarPosted Jun 8, 2017, 1:49 AM
=Get-SPOSite -Identity $SiteColl.Url | select Owner, StorageQuota , Url,ResourceQuota, Template, LocaleId, TimeZoneID, Title
Umesh MurumkarPosted Jun 8, 2017, 1:49 AM
Hi thanks for the script but I am getting problem with this. I need TimeZoneID which is not appearing while script run.