How to troubleshoot Windows PowerShell issues that affect Exchange Online for Office 365

Article ID: 2570535 - View products that this article applies to.

Not sure what release of Office 365 you're using? Go to the following Microsoft website:
Am I using Office 365 after the service upgrade?
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes how to troubleshoot Windows PowerShell issues that affect Microsoft Exchange Online for Microsoft Office 365.

PROCEDURE

Windows PowerShell is a command-line interface that's used to run administrative commands on Windows operating systems and server products. Windows PowerShell 2.0 includes Remote Windows PowerShell functionality.

Remote Windows PowerShell lets users run Windows PowerShell cmdlets on other computers or web services. This functionality relies on the Windows Remote Management service to connect to web services and to download the available cmdlets based on the user who is currently logged in. Office 365 lets admins connect to Exchange Online by using Exchange Online Remote PowerShell.

To connect to Exchange Online, you must have the following tools:
  • Windows PowerShell 2.0
  • Windows Remote Management 2.0 (also known as WinRM)
  • Background Intelligent Transfer Service (BITS) 4.0
The Windows Management Framework installs all these tools. For download information, go to the following Microsoft Knowledge Base article:
968929 Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0)
For more information about how to connect to Exchange Online by using Windows PowerShell, go to the following Microsoft website:
Connect Windows PowerShell to the Service

Troubleshoot the Windows PowerShell connection to Exchange Online

Issue: You receive a "The WinRM client cannot process the request because the server name cannot be resolved" error message

When the local computer is denied access to ps.outlook.com, you may receive the following error message:
[ps.outlook.com] Connecting to remote server failed with the following error message :
The "WinRM client cannot process the request because the server name cannot be
resolved. For more information, see the about_Remote_Troubleshooting Help topic.

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

+ FullyQualifiedErrorId : PSSessionOpenedFailed
This issue occurs if an internal firewall isn't started or if the Windows Remote Management service isn't started.

To determine whether the Windows Remote Management service is installed and has started, follow these steps:
  1. Do one of the following:
    • In Windows 7 or in Windows Vista, click Start, type services.msc in the Start search field, and then press Enter.
    • In Windows XP, click Start, click Run, type services.msc, and then press Enter.
  2. In the Services window, double-click Windows Remote Management.
  3. Set the startup type to Manual, and then click OK.
  4. Right-click the service, and then click Start.
  5. Let the service start.

    Note If the service was already started but it's not responding, you may have to click Restart.
  6. Try to connect to Exchange Online again.

Issue: You receive an "Access is denied" error message

You receive the following error message if an incorrect user name or password is entered or if the user tries to sign in to the service by using an account that doesn't have access to Exchange Online:
[ps.outlook.com] 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) [].
PSRemotingTransportException

+ 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 :
ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ImportPSSessionCommand
By default, only global admins have access to connect to Exchange Online by using Windows PowerShell. Other admins must be delegated access in the Exchange Admin Center (in Office 365) or Exchange Control Panel (in Office 365 pre-upgrade) to connect to Exchange Online by using Windows PowerShell.

To resolve this issue, add the user as a member of the administrator role group. To do this, use one of the following methods:

 Use Exchange Admin Center in Office 365

To add a user by using the Exchange Admin Center in Office 365, follow these steps:
  1. Sign in to the Office 365 portal (https://portal.microsoftonline.com) as an administrator.
  2. On the navigation bar, click Admin, and then click Exchange.
  3. Click Permissions, and then click the Admin Roles tab.
  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 (+) under Members.
  6. Click Save.
Use Exchange Control Panel to add a user in Office 365 pre-upgrade

To add a user by using the Exchange Control Panel in Office 365 pre-upgrade, follow the steps that are described in the following article:
Add or Remove Role Group Members
Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2570535 - Last Review: May 15, 2013 - Revision: 9.0
Applies to
  • Microsoft Office 365 for enterprises (pre-upgrade)
  • Microsoft Office 365 for small businesses  (pre-upgrade)
  • Microsoft Office 365 for education  (pre-upgrade)
  • Microsoft Exchange Online
Keywords: 
o365 o365022013 after upgrade o365062011 pre-upgrade o365e o365p o365a o365m KB2570535

Give Feedback