You are currently offline, waiting for your internet to reconnect

Your browser is out-of-date

You need to update your browser to use the site.

Update to the latest version of Internet Explorer

"Access is denied" error when you connect to Exchange Online by using remote Windows PowerShell

When you try to connect to Microsoft Exchange Online by using remote Windows PowerShell, you receive the following error message:
[] Connecting to remote server failed with the following error message: Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.

+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [].

+ FullyQualifiedErrorId : PSSessionOpenedFailed

Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null.
Supply a non-null argument and try the command again.

At D:\Users\Connect.ps1:7 char:21

+ Import-PSSession < < < < $Session

+ CategoryInfo : Invalid Data: (:) [Import-PSSession], ParameterBindingValidationException

+ FullyQualifiedErrorId :
This issue occurs for one of the following reasons:
  • You enter an incorrect user name or password.
  • You try to sign in to the service by using an account that doesn't have access to Exchange Online.
To resolve this issue, use the Exchange admin center in Office 365 to add the user as a member of the administrator role group. To do this, follow these steps:
  1. Sign in to the Office 365 portal ( as an administrator.
  2. Click Admin, and then click Exchange.
  3. Click permissions, and then click  admin roles.
  4. Double-click the role group to which you want to add the user. For example, if you want the user to have full access that includes Windows PowerShell, double-click Organization Management.
  5. To add the user to the list, click Add (Add icon) under Members.
  6. Click Save.
For more information about how to connect to Exchange Online by using remote PowerShell, go to Connect to Exchange Online using Remote PowerShell.

Still need help? Go to the Office 365 Community website.

Article ID: 2905767 - Last Review: 02/29/2016 01:33:00 - Revision: 8.0

  • Microsoft Exchange Online
  • o365 o365a o365e o365p o365m o365022013 KB2905767