Office 365 - Powershell

Connecting to Office 365 via Powershell for the first time? Here are the steps to get started:

  1. Install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW
  2. Install the Azure Active Directory Module for Windows Powershell (64-bit version)
  3. Open Powershell and run this command the first time you connect on your computer:
Set-ExecutionPolicy RemoteSigned
  1. Next, run these three commands (you'll do this everytime you want to connect):
$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session
  1. You should now be connected.  When finished, run:
Remove-PSSession $Session

Update: Here is an awesome project on github that is a Office 365 Powershell GUI:

Microsoft References: