Connect to Office 365 Exchange Online from PowerShell


Please see the new improved way …..>>> https://ryanmangansitblog.wordpress.com/2013/07/05/login-script-for-office-365-powershell/

 

Just a quick post on how to connect to Office365 Microsoft Exchange online:

Download and install PowerShell for office 365

Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

Windows Azure Active Directory Module for Windows PowerShell (32-bit version) 

Open Azure PowerShell:

$Cred = Get-Credential

Office365_1

Import-Module MSOnline
Set-ExecutionPolicy remotesigned
Connect-MsolService -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection

Office365_2

Import-PSSession $Session

Office365_3

Once finished with the session you can disconnect using the following:

Remove-PSSession $Session

5 thoughts on “Connect to Office 365 Exchange Online from PowerShell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s