Tuesday, 19 June 2018

How to Install and Connect SharePoint Online PowerShell Module

SharePoint Online team focusing Microsoft Graph Api to provide common api experience for Office 365 users, but some Admin related activities still we need to use powershell module. Follow the below steps to install and connect SharePoint Management Shell.
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Note: If powershell console is already opened, close and open the powershell again after installing the above setup.
  • Now run the following command after replacing your tenant name to connect spo service. Actually you have to set your spo admin site url, you can refer this post for more info: how to get SharePoint Online Admin Site Url
Connect-SPOService -url https://<your tenant name>-admin.sharepoint.com
  • Once you have connected the SPO service, then you can run SPO management commands. The below command lists all spo sites.
Get-SPOSite | Select Title, Url

Advertisements
Advertisements

No comments:

Post a Comment