Vorsite Cloud Services

Install and Configure the Office 365 PowerShell Cmdlets:

Written by cloudservicesforbusiness | September 13, 2012

Sometimes performing tasks as an Office 365 administrator requires the use of PowerShell.  In an earlier blog entry I showed how to connect PowerShell to Office 365, this time we'll look at installing and configuring the Office 365 PowerShell Cmdlets (pronounced "command lets") on your local computer.

You need either Windows 7 or Windows Server 2008 R2 with Windows PowerShell and .NET Framework 3.5.1 or higher installed.  You'll also need to download and install the Office 365 Sign-in Assistant.  Here's the links to either the 32 or 64 bit version:
Microsoft Online Services Sign-In Assistant (IDCRL7) - 32 bit version
Microsoft Online Services Sign-In Assistant (IDCRL7) - 64 bit version

Next you will download and install the cmdlets.  After you download the appropriate file, double-click the "AdministrationConfig.msi" file.
Microsoft Online Services Module for Windows PowerShell (32-bit version)
Microsoft Online Services Module for Windows PowerShell (64-bit version)

The installation adds the shortcut titled "Microsoft Online Services Module for Windows PowerShell" to your desktop and the Start Menu.  Once the module is installed you can try connecting to Office 365 by following the directions in the previous blog.

If you are facing any problems you may have to enable PowerShell scripts to run on your computer.  Type the following command after opening PowerShell as an Administrator:

Get-ExecutionPolicy

If the results say anything other than RemoteSigned then run this command:

Set-ExecutionPolicy RemoteSigned

That should enable your computer to connect PowerShell to Office 365.  If it doesn't then go through this TechNet article for further troubleshooting:
https://docs.microsoft.com/en-us/office365/enterprise/powershell/cmdlet-references-for-office-365-services