Exchange managment shell/toolbox failed to connect/load

Kosta Moisidis 21 Reputation points
2022-07-22T11:20:44.503+00:00

I am experiencing following issue with EMS after numerous issues with IIS which recently broke down.
I was stuck with WinRM error and after consulting this guide I ended up with this:

   New-PSSession : [server.domain.local] Connecting to remote server server.domain.local failed with  
    the following error message :  For more information, see the about_Remote_Troubleshooting Help topic.  
   At line:1 char:1  
   + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Micr ...  
   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
       + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin  
      gTransportException  
       + FullyQualifiedErrorId : -2144108173,PSSessionOpenFailed  

We were able to fix the ECP but not toolbox and EMS.
The error message which seems to be empty, time to time spits some gibberish. For instance:

   New-PSSession : [server.domain.local] Connecting to remote server [server.domain.local] failed with  
    the following error message :  欯ȍ For more information, see the about_Remote_Troubleshooting Help topic.  
   At line:1 char:1  
   + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Micr ...  
   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
       + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin  
      gTransportException  
       + FullyQualifiedErrorId : -2144108173,PSSessionOpenFailed  

One time it was very long string of what seemed like XML config. But that one I scraped later on. (possible security issue?)
Regardless, the error search have not showed what else could be wrong. IIS bindings should be right but I will gladly get a second opinion on those should they be wrong as well.

OS is Windows server 2019 and IIS is v15.

Thank you in advance,
Kostas.

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,444 questions
Internet Information Services
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,335 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,206 Reputation points
    2022-07-25T06:07:33.48+00:00

    @Kosta Moisidis

    I would suggest you try to connect to EMS from remote PowerShell. If you cannot connect to EMS with remote PowerShell, it mean the EMS virtual directory has broken, you could take steps below to recreate it:

    Run PowerShell with administrator privileges on your Exchange server, then import module below

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;   
    

    You will could check EMS virtual directory with command below:

    Get-PowerShellVirtualDirectory  
    

    Then use commands below to delete EMS virtual directory and recreate it:

    Remove-PowerShellVirtualDirectory -Identity "EXName\PowerShell (Default Web Site)" -Confirm:$false  
    New-PowerShellVirtualDirectory -Server "EXName" -Name Powershell -InternalUrl https://EXName.domain.com/PowerShell -ExternalUrl https://mail.domain.com/PowerShell -RequireSSL:$false  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.