Using PowerShell is a great way to administering your Office 365 configuration. This blog will describe what you need to get started.

First you need to download and install the Office 365 PowerShell module for Windows PowerShell. The requirements of using the Office 365 cmdlets on the computer are as follows:

– OS must be Windows 7 or Windows Server 2008 R2
– The computer must have Windows PowerShell and the .Net Framework 3.5.1 installed
– The computer must have the Microsoft Online Services Sign-in Assistant installed, it can be download from here.

Download the 32-bit or 64-bit version of Microsoft Online Services module for Windows PowerShell from here.

To install the Office 365 PowerShell Module just double-click on the AdministrationConfig.msi file. You will find a Microsoft Online Services module shortcut on your desktop and in the Start menu after the install.

This Office 365 PowerShell Module will give you the opportunity to manage your Office 365 Users, Group and role membership, Domains, Single sign-on, Subscriptions and licenses, Company information and service.

Now you only need to connect you to your Office 365 installation, just start the Office 365 PowerShell module from the desktop or Start menu, and type in Connect-MsolService. This will prompt you for Office 365 credentials, enter credentials and you will be connected.

For more cmdlets type Get-Command or visit Windows PowerShell cmdlets for Office 365.

Managing Exchange Online
You don’t need Office 365 PowerShell module for managing your Exchange Online configuration with PowerShell, just start PowerShell and type in following commands.

$Cred = Get-Credential

 

This command will request Office 365 credentials, type in and click OK.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection

Import-PSSession $Session

Now you connected to Exchange Online.

For information about Exchange Online cmdlets see Reference to Available PowerShell Cmdlets in Exchange Online

When finished, type this command to disconnect from Exchange Online.

Remove-PSSession $Session

Enjoy.