We are using SharePoint Online Management Shell to get the SharePoint Online sites, List, features, etc information.
Prerequisites :
Step1: Download and installation of SharePoint Online Management Shell:
Download https://www.microsoft.com/en-in/download/details.aspx?id=35588
Step2: Install in Your Laptop
Step3: Once install find the
from Start menu.
Before you connect to SharePoint Online, you will need to have a username and password for an account with global administrator permission. Sharepoint Site collection admin permissions not enough to run Management Shell.
Where to Write Script:
before write the script, we have to connect to SharePoint Online Site using your userid and password.
Connect to SharePoint Online:
Open the "SharePoint Online Management shell" from Start menu and select "run as administrator"
Step1: $myCredentials = Get-Credential Provide the User name and password after prompt below screen

Step2: Import Microsoft.Online.SharePoint.PowerShell Powershell module to Management Shell Console.

Step3: Connect to tenant administrator site
Connect-SPOService -URL https://myoffice365-admin.sharepoint.com/

with completing of above steps, we connected to SharePoint online service.
Below Sample example to get the all Site collections after connect to the SharePoint online
Get-SPOSite

To see what commands are available. run below command.Get-Command –Module Microsoft.Online.SharePoint.PowerShell
Disconnect command : Disconnect-SPOService
Prerequisites :
Step1: Download and installation of SharePoint Online Management Shell:
Download https://www.microsoft.com/en-in/download/details.aspx?id=35588
Step2: Install in Your Laptop
Step3: Once install find the
Before you connect to SharePoint Online, you will need to have a username and password for an account with global administrator permission. Sharepoint Site collection admin permissions not enough to run Management Shell.
Where to Write Script:
before write the script, we have to connect to SharePoint Online Site using your userid and password.
Connect to SharePoint Online:
Open the "SharePoint Online Management shell" from Start menu and select "run as administrator"
Step1: $myCredentials = Get-Credential Provide the User name and password after prompt below screen
Step2: Import Microsoft.Online.SharePoint.PowerShell Powershell module to Management Shell Console.
Step3: Connect to tenant administrator site
Connect-SPOService -URL https://myoffice365-admin.sharepoint.com/
with completing of above steps, we connected to SharePoint online service.
Below Sample example to get the all Site collections after connect to the SharePoint online
Get-SPOSite
To see what commands are available. run below command.Get-Command –Module Microsoft.Online.SharePoint.PowerShell
Disconnect command : Disconnect-SPOService