PowerShell SharePoint: Installing SharePoint Online Management Shell

Once upon a time there was a need to download an MSI and to install the SharePoint PowerShell Module that way, however, as all useful and trusted modules do one day it now can be found in the PowerShell Gallery at this linkMicrosoft.Online.SharePoint.PowerShell. If you were still to need it for some reason it can be located here. But don't bother doing that, have a read below and get started using SharePoint Online Management Shell.

So, to install the module, run PowerShell as administrator and type …

Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Then to bring it in to use by sending this command …

Import-Module -Name Microsoft.Online.SharePoint.PowerShell

Now we have the module, installed and imported to the session let's connect …

Connect-SPOService -Url https://alanlearnsstuff12345-admin.sharepoint.com

Would you like to buy Alan a coffee?

Visit the AlanPs1 Ko-fi page

When Prompted type in your Admin Credentials in the usual way.

You can verify the connection is successful by running the Get-SPOSite cmdlet to return a list of all site collections, as follows: Get-SPOSite

To view the organization-level site collection properties, run the following command and press ENTER: Get-SPOTenant

To disconnect from the SharePoint Online service when finished, run the following command: Disconnect-SPOService

I have tested the above by running the same command from above, Get-SpoSite yet it clearly states, `No Connection Available`.

Note: This blog post will be referred to from other more indepth blog posts using that harness the  SharePoint Online Management Shell.