Grafvision - Fotolia
Although Microsoft exposes most of the important SharePoint management capabilities through a graphical user interface, many administrators find it necessary to occasionally delve into PowerShell. PowerShell makes it possible to script a wide variety of management and reporting tasks for SharePoint.
Unfortunately, PowerShell-based management for SharePoint Online has historically remained somewhat elusive. Microsoft has long provided a set of Office 365 cmdlets that provide a degree of management for SharePoint Online, but these cmdlets were anything but comprehensive. The Office 365 cmdlets allowed for user and group management, but the cmdlets set was geared more toward managing Office 365 as a whole rather than being SharePoint specific. This meant that the bulk of the available cmdlets focused on things like domain and licensing information, and some of the cmdlets applied to Exchange and Lync.
The SharePoint Online Management Shell is designed to make up for the shortcomings in the Office 365 cmdlet set by offering a set of cmdlets that provide much more granular PowerShell-based management capabilities for SharePoint Online. The SharePoint Online Management Shell provides roughly about two dozen new cmdlets that are geared toward functions such as site collection management, service connection and disconnection, organization level monitoring and management, user management, and group management. You can access the full list of cmdlets here.
Before you can begin using the SharePoint Online Management Shell, there are a few things that you need to do. First, you have to make sure that you have the appropriate permissions. Simply being a SharePoint Online Administrator is not enough. You must be an Office 365 Global Administrator in order to use any of the SharePoint Online Management Shell cmdlets.
The next thing that you have to do is to make sure that you are running version 3.0 or higher of Windows PowerShell. In case you are wondering, Windows 8.1 comes with PowerShell version 4.0. You can check your PowerShell version by entering $PSVersionTable into the PowerShell command prompt.
Once the necessary permissions are in place and you have the correct version of PowerShell, download the SharePoint Online Management Shell. The SharePoint Online Management Shell is available from the Microsoft Download Center here. It is designed to work with Windows 7 (SP1 or higher), Windows 8, Windows Server 2008 (SP2 or higher), and Windows Server 2012. Although not listed in the official system requirements, the tool would presumably also work with Windows 8.1 and Windows Server 2012 R2. The SharePoint Online Management Shell is available in both 32-bit and 64-bit versions and can be installed by executing a simple MSI file.
The SharePoint Online Management Shell installation process does not add the new set of cmdlets to PowerShell and provide automatic connectivity to SharePoint Online. Instead, the SharePoint Online Management Shell is opened independently of the native PowerShell application, similar to the way that the Exchange Management Shell is based on PowerShell, but is opened separately. If you are running Windows 7 or Windows Server 2008 then the SharePoint Online Management Shell is added to the Start menu at All Programs / SharePoint Online Management Shell.
After opening the SharePoint Online Management Shell, you will need to establish a connection to SharePoint Online before you can begin using the shell. This can be accomplished by using the Connect-SPOService cmdlets. This cmdlets is normally used in conjunction with the URL for the SharePoint Online Administration Center and the user name that you want to log in with. The command looks like this:
Connect-SPOService –URL <the URL for the SharePoint Online Administrative Center> -Credential <your E-mail address>
After executing this command you can begin using the SharePoint Management Shell.
The SharePoint Management Shell allows for more comprehensive PowerShell-based management for SharePoint Online. Even if you have no desire to manage SharePoint Online through PowerShell, you can use the SharePoint Management Shell for inventory and reporting purposes.