Error “Failed To Connect To An Exchange Server In The Current Site” While Running Exchange 2013 Shell

MS Exchange

I received an email today from an Exchange admin who is testing 2013 Preview & is stuck with the error mentioned while running the 2013 Shell.

The detailed error is as follows.

VERBOSE: Connecting to server.domain.com.
New-PSSession : [server.domain.com] Connecting to remote server server.domain.com failed with the following error message : The WS-Management service does not support the request. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : WinRMOperationNotSupportedOnServer,PSSessionOpenFailed
Failed to connect to an Exchange server in the current site.
Enter the server FQDN where you want to connect.:

The fix is to run one of the prerequisite steps for installing Exchange 2013.

From an elevated command prompt, run the following.

%SystemDrive%\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir โ€“enable
IISReset

This step is required to register ASP.NET with .NET Framework 4.5 in Internet Information Services (IIS).

Exchange admins get all excited about installing the latest version and miss the steps ;)

Other Popular Articles


MS Exchange

Keep Track Of Exchange 2013 Database Failovers

MS Exchange

Playing With Exchange 2013 Performance Logs

MS Exchange

Tackle .Net Framework 4.6.1 On Exchange Servers

22 thoughts on “Error “Failed To Connect To An Exchange Server In The Current Site” While Running Exchange 2013 Shell”

  1. Hi Rajith I have the dame problem.
    With Win server 2012 and MS EXCHANGE 2016.
    Also in the server Exchange the DNS IP on the ethernet adapter , change to
    8.8.8.8 and 9.9.9.9. in automatic
    What Happen?
    My mail service is stop.

    Thanks
    Mario Borges

    Reply
  2. Hi Rajith,

    Thanks for your article on this issue.
    I followed it but getting still getting the error:

    “New-PSSession : [dbmbx01.abc.com] Connecting to remote server dbmbx01.abc.com failed with the
    following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic”

    I have 2 Ex2013 CAS servers and 2 MBX servers (all 2013 – SP1 – CU7) on Win 2008 R2 SP1.

    Followed the article – http://dbanda.blogspot.co.uk/2013/05/problem-with-exchange-2013-management.html

    The Powershell site (in IIS under Default Web site) is pointing to the right directory.

    D:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell

    But on clicking the “Test Settings” button it gives an error “Invalid application path”.

    If I click on “connect As” and putin my same login credentials the “Test settings” is success !!

    Pls help.

    Many thanks,

    Vikas

    Reply
    • I JUST got off the phone with Microsoft, and this problem (for ME) was all
      because the PDC and the Exchange Server were NOT “TIME synchronized”!!!
      IF the Exchange Server is OFF by 6+ minutes THEN you will have this problem
      as well as EMAIL to the Outside WILL STOP!

      This article
      (https://technet.microsoft.com/en-us/library/cc816884(v=ws.10).aspx)
      provided my answer. (My PDC had ALREADY been configured to use an
      “authoritative Time”, but apparently all my other Servers were NOT being
      told to “Look to the PDC for your TIME”.
      ON ALL your DCs and ALL your Servers, open a “Command Prompt (Admin)
      and type the , type the following 3 lines (hitting enter after each
      command): (each one will take a second or 2 to complete)

      w32tm /config /syncfromflags:domhier /update (Enter)
      net stop time (Enter)
      net start time (Enter)

      Do ALL the DCs FIRST, then do the Exchange Server.

      Then you MUST reboot the Exchange Server for this to have an effect
      for Exchange. After Rebooting and waiting until ALL the services
      have come back up, I was again able to open “Exchange Management Shell”
      and “Exchange Toolbox”!

      Hope this helps someone!

      Reply
  3. I’m running Windows 2012 Standard with IIS 6 came with the HP server base install and the command to install 4.5 simply lists the available options and does nothing and I continue to get errors trying to run the management shell of not being able to connect.

    Should I upgrade IIS to 7 or 8 first? The cert errors are showing up for users so I have to either shutdown this box asap or fix it

    Please advise! Thanks!!

    Reply
  4. I am also Exchange 2013 with Server 2012 with the same problem.

    New-PSSession : [localservername.domain.com] Connecting to remote server magmail01.magnumstaffing.com failed with
    the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI “$connectionUri” -ConfigurationName Microsoft.Excha …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Reply
    • Hi Steve,

      What build of Exchange 2013 are you using? This used to be an issue in 2013 Preview. RTM, CU1 and CU2 should work fine.
      Is Windows 2012 fully patched? If not, please do that.

      Reply
  5. hi

    I have exactly the same issue and it looks like that this is the only answer all over the web but it is not helping me

    i run this command for Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929 and this is what i am reciveing

    ******************************************************
    Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
    Administration utility to install and uninstall ASP.NET on the local machine.
    Copyright (C) Microsoft Corporation. All rights reserved.
    Start installing ASP.NET (4.0.30319.17929) without changing existing web applica
    tions to use this version of ASP.Net.
    This option is not supported on this version of the operating system. Administr
    ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the “Turn Win
    dows Features On/Off” dialog, the Server Manager management tool, or the dism.e
    xe command line tool. For more details please see http://go.microsoft.com/fwlin
    k/?LinkID=216771.
    Finished installing ASP.NET (4.0.30319.17929) without changing existing web appl
    ications to use this version of ASP.Net.
    ******************************************************

    i also run
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -ir -enable
    but this time i am reciving this :

    ******************************************************
    Start installing ASP.NET (2.0.50727).
    ………………………..
    An error has occurred: 0x80004005 Unspecified error

    ******************************************************

    any suggestion ?

    Reply

Leave a Comment