Office 365 PowerShell–The Two-Headed Monster

One of the best features in Office 365 is the ability to manage it via PowerShell.  However, currently there are two separate PowerShell interfaces into Office 365 depending on what you’re trying to do.  If you want to manage settings under the main Portal (think AD stuff) you connect via a PowerShell 1.0 interface requiring you to load tools on your local workstation.  If you want to manage things under Exchange Online you utilize PowerShell remoting which requires you to have nothing installed on your local system other than PowerShell 2.0.  Here’s the specifics for each method…

 

Portal PowerShell Administration

Prerequisites

  • Windows 7 or Windows Server 2008 R2
  • Windows PowerShell and the .NET Framework 3.5.1 enabled

Software to Install

  • Microsoft Online Services Sign-In Assistant – 32bit  64bit
  • Microsoft Online Services Module for PowerShell – 32bit  64bit

Connecting to the Microsoft Online Services Portal

  1. Click on Start > All Programs > Microsoft Online Services > Microsoft Online Services Module for PowerShell
  2. Run “Connect-MsolService”
  3. When prompted enter the credentials of an administrator account
  4. To get a list of all available commands run “Get-Command –Module MSOnline”

For a complete list of all commands and usage click on the following link…

http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh125002.aspx

 

Exchange Online PowerShell Administration

Prerequisites

  • Windows 7 or Windows Server 2008 R2 – No Additional Software Necessary
  • Windows XP SP3, Vista SP1, Server 2003 SP2, Server 2008 SP1 – See Below

Software to Install

Connecting to Exchange Online

  1. Click on Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell
  2. The first time run “Set-ExecutionPolicy RemoteSigned”
  3. Run “$LiveCred = Get-Credential”
  4. When prompted enter the credentials of an administrator account
  5. Run “$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection”
  6. Run “Import-PSSession $Session”
  7. To get a list of all commands run “Get-Command –Module tmp*”

For a complete list of all commands and usage click on the following link…

http://help.outlook.com/en-us/140/dd575549.aspx

Advertisements

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