Sunday, December 21, 2014

Access Exchange Online Mailboxes Using Remote PowerShell

Introduction To Powershell:-

PowerShell  is one of the powerful object oriented scripting language that provides exchange server Online management capabilities using commands. These commands acts as the heart of the Powershell. For this first create a PowerShell environment on window by installing the PowerShell on local machine (computer) and then create a remote shell session. Administrators can also access the exchange online using remote PowerShell.

Why Powershell is preferred by Technical users:-

One of the important skill that a system administrator should have is the capabilities of the task automation. And one of the powerful scripting language that can perform the function of task automation is Windows Powershell.

Microsoft Remote Powershell provides management capabilities of the remote exchange server to the administrators from the workstation and other computers.

Windows Powershell is an object based shell. The output of the command in Powershell is not the text as in the case of Unix, Linux, Cmd. Powershell returns an Object of .net as the output of cmdlet.

Steps to Access Exchange online using remote Powershell:-

The process is quite simple and require not more than three steps:-
  1. At first enter your Exchange online credentials .
  2. Enter the connection settings.
  3. And then import the cmdlets to Powershell.

Prerequisites to connect with the Exchange online:-

  1. Operating System (Window Server 2012, Window Server 2008 R2 Service Pack1, Window 7, Window 8.
  2. If you are using Windows 7 Service Pack 1 or Window 2008 R2 Service Pack1 then you also have to Install.
Microsoft .Net Framework 4.5
Window Management Framework 3.0

Steps to connect exchange online:-

Launch the Powershell on your local machine and Create a variable in which you can store the credentials for the administrator using the following commands.

$UserCredential = Get-Credential

Press Enter.
And provide the Credentials details.

After Entering the Credentials Connect with the Exchange Organization to have an access to the exchange online using remote PowerShell.

To import the server side powershell session run the following commands.

Import-PSSession $Session

Disconnect the session when you have done.

Remove –PSSession $Session

After this command Import-PSSession $Session that we have used in the third step exchange online cmdlets are installed to your machine . If the command runs successfully means there is no error and you have connected successfully.

For testing purpose run the command Get-Mailbox, if you are able to view results that means you have connected successfully.

In case if you are receiving an error that may be due to the following reason:-

May be you have passed wrong credentials to the server, i.e. maybe you have entered a misspelled user name or may be due to you have entered a wrong password.

Try again after using run as administrator.


The method  to Access Exchange online using remote powershell given above may be enough for the user to understand the steps that are required while Accessing Exchange online using powershell. In case if the user is finding any difficulty, please comment we will respond as soon as possible.


Post a Comment

Post a reply