How to Connect Exchange Online (Office 365) Using Remote PowerShell


System Requirements

  1. Microsoft .NET Framework 4.5 must be installed on the computer, see Installing the .NET Framework 4.5. (Windows server 2012, windows 8, windows 7 SP1, windows 2008 R2 sp1)
  2. Windows Management Framework 3.0  with windows powershell 3.0 and win RM 3.0 must be installed on the computer you use to connect to Exchange Online. To download Windows Management Framework 3.0, see Windows Management Framework 3.0. (Windows server 2012, windows 8, windows 7 SP1, windows 2008 R2 sp1)
  3. To connect Exchange Online must be running one of the following operating systems:

Windows Server 2012

Windows Server 2008 R2 SP1

Windows 8

Windows 7 SP1

  1. TCP port 80 must be open between your client computer and Exchange Online
  2. The user account you use to connect to Exchange Online must be enabled for remote Shell. For more information, see Manage Remote PowerShell Access in Exchange Online.
  3. Windows PowerShell script execution must be enabled on the computer you use to connect to Exchange Online
  4. To help prevent denial of service (DoS) attacks, you’re limited to three open PowerShell connections to your Exchange Online organization
        Set-ExecutionPolicy RemoteSigned

Connect to Exchange Online

Go to Powershell

$UserCredential = Get-Credential

In the Windows PowerShell Credential Request dialog box, type the user name and password of an account in your Exchange Online organization

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

Disconnect from Exchange online

Remove-PSSession $Session
Advertisements
This entry was posted in Office 365 and tagged . Bookmark the permalink.

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