Connecting Power Shell to Office 365 for Enterprises

Requirements

Before connecting to any Office 365 PowerShell interface, the following must be installed:

  • Power Shell V2.0
  • Windows Remote Management
  • BITS 4.0
  • Organization IDCRL*
  • Windows 7 or Windows 2008*

Note: Requirements that are marked with an asterisk (*) are only for the Microsoft Online Services Module for Windows PowerShell cmdlets.

The core prerequisites can be installed by downloading and installing Windows Management Framework.

 

Supported operating systems

The supported operating systems are as follows:

  • Windows Server 2008 R2*
  • Windows 7*
  • Windows Vista Service Pack 1 SP1 or SP2
  • Windows Server 2008 SP1 or SP2
  • Windows Server 2003 SP2
  • Windows XP SP3

Note; Requirements that are marked with an asterisk (*) are only for the Microsoft Online Services Module for Windows PowerShell cmdlets.

Connect to Exchange Online by using Remote Shell PowerShell

The following steps assume that you have met all the installation requirements. To connect to Exchange Online by using Remote PowerShell, follow these steps:

  1. Open PowerShell 2.0. (Run as Administrator)
  2. At the prompt, type $cred = Get-Credential. The user is prompted to enter their administrative credentials.
  3. Create a Remote PowerShell object. To do this, type the following:

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

  1. Before you can run remote scripts, you must run set-executionpolicy remotesigned
  2. Download all the available cmdlets from the server. To do this, type Import-PSSession $session. After this command is run successfully, the available cmdlets are downloaded.

To obtain a complete list of cmdlets that are available in this interface, after you are connected, run the Get-Command command at the PowerShell prompt.

Please note: I reserve the right to delete comments that are offensive or off-topic.

Leave a Reply

Your email address will not be published. Required fields are marked *