Connect to Office 365 SharePoint Online using PowerShell
Here is how to connect to your SharePoint Online environment using PowerShell and the Connect-SPOService cmdlet:
- Download the SharePoint Online Management Shell
- Run the SharePoint Online Management Shell (there will be an icon in the Start Menu)
- Connect using the following command and authenticate as normal when prompted:
Connect-SPOService -Url https://<yourtenant>-admin.sharepoint.com
Note: a lot of familiar cmdlets from an on-premise farm will not be available so review the Index of Windows PowerShell for SharePoint Online cmdlets page on TechNet.