Since most of the SharePoint implementation paradigms are moving fast towards cloud based hosting it has now become crucial to get hands on with the respective cloud counterparts of On Premise SharePoint Implementations.

We will see the details on how to setup a machine to start working with “SharePoint Online Management Shell” in the upcoming articles but in this article we will see the details on how to setup a machine to start working with PowerShell in O365. Since SharePoint Online is a part of Office 365 Platform it is necessary to have some understanding on the basic operations of O365 first.

Let’s first discuss the prerequisites for configuring PowerShell for O365.

Prerequisites

We need to install the following two components in order to get PowerShell working for O365 right from your Windows PowerShell console or SharePoint Management Shell console

Install Microsoft Online Services Sign-In Assistant

You can download this component from the following Url.

With this we are done with the installation of Microsoft Online Services Sign-In Assistant.

Now let’s see the steps involved in installing the next component.

Install Windows Azure Active Directory Module for Windows PowerShell

You can download this component from the following Url.

With this we are done with the installation part. The next thing would be to verify if the components are installed as expected and SharePoint Online Management Shell is responding.

Verify configuration of SharePoint Online Management Shell

I am assuming that you have got a valid O365 Developer Account as we will need it in the upcoming steps.

If you don’t have the O365 Developer Account yet, you can create it by navigating to https://products.office.com

Follow the steps below in order to verify the “SharePoint Online Management Shell” is responding as expected:

Import-Module MSOnline

19

$userCredentials = Get-Credential

Enter your O365 Credentials when asked.

20

Connect-MSOLService -Credential $userCredentials

Try connecting to MSOLService by using the above command and see if we get success

21

If the Command Prompt returns without any errors that means we are able to connect to the service successfully.

22

Get-MSOLUser

Try exporting the list of Active Users using the above command and see if it is responding with the correct user information

23
We can see user information is returned by this Command . PowerShell of O365 is configured as expected and we are good to go.🙂

24

We can further verify this information by logging into Office 365 Admin Center

Sure enough we can see the same User Information as returned by this Command, this ensures that we are done with configuration of PowerShell for Office 365 correctly.

I will meet you again in my upcoming articles with some more useful commands to work with SharePoint Online & Office 365.

Hope you find this helpful.