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
- Microsoft Online Services Sign-In Assistant
- Windows Azure Active Directory Module for Windows PowerShell
Install Microsoft Online Services Sign-In Assistant
You can download this component from the following Url.
- Visit the Url and Click Download
- Select 64 Bit .msi file as shown below
- Choose Run once and get the popup notification
- Let the installation go until another screen appears
- Accept the License Terms and Click Install
- Allow the Installation by clicking Yes
- Let the installation run and wait for further instructions
- Click Finish to exit the Installer on completion
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.
- Visit the Url
- Choose Run once and get the popup notification
- Click Next to continue with the installation
- Accept the License agreement and click Next to continue with the installation
- Choose the installation Path or continue with the defaults
- Click Next to continue
- Click install to Start the Installation
- Allow the Installation by clicking Yes
- Let the installation run and wait for further instructions
- Click Finish to exit the Installer on completion
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:
- Launch SharePoint 2013 Management Shell
- Run the following commands
Import-Module MSOnline
$userCredentials = Get-Credential
Enter your O365 Credentials when asked.
Connect-MSOLService -Credential $userCredentials
Try connecting to MSOLService by using the above command and see if we get success
If the Command Prompt returns without any errors that means we are able to connect to the service successfully.
Get-MSOLUser
Try exporting the list of Active Users using the above command and see if it is responding with the correct user information
We can see user information is returned by this Command . PowerShell of O365 is configured as expected and we are good to go.
We can further verify this information by logging into Office 365 Admin Center
- Browse https://login.microsoftonline.com
- Enter O365 Credentials and login
- On the Home page select Admin Center Tile
- Once you reach Admin Center Page, select Users >Active Users from left navigation
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.