none
Exchange 2010 Poweshell not connecting to the local host

    Question

  • Hello Team,

    Am facing the issue while connecting the EMS in one of the CASHUB servers and below is the error 

    VERBOSE: Connecting to TVLSUNHUBCAS01.sunoptical.co.in

    [TVLSUNHUBCAS01.sunoptical.co.in] Connecting to remote server failed with the following error message : The WS-Management serv
    ice does not support the request. For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    VERBOSE: Connecting to TVLSUNHUBCAS01.sunoptical.co.in
    [TVLSUNHUBCAS01.sunoptical.co.in] Connecting to remote server failed with the following error message : The WS-Management serv
    ice does not support the request. For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    VERBOSE: Connecting to TVLSUNHUBCAS02.sunoptical.co.in
    Microsoft.PowerShell.Commands.ExportPSSessionCommand, Microsoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=n
    eutral, PublicKeyToken=31sswqtad364e35 : Unable to find type [Microsoft.PowerShell.Commands.ExportPSSessionCommand, Mi
    crosoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]: make sure that
     the assembly containing this type is loaded.
    At C:\Users\admin\AppData\Roaming\Microsoft\Exchange\RemotePowerShell\TVLSUNHUBCAS02.sunoptical.co.in\TVLSUNHUBCAS02.sunoptical.co.in.psm1:16 char:217
    + $script:__psImplicitRemoting_versionOfScriptGenerator = [Microsoft.PowerShell.Commands.ExportPSSessionCommand, Micros
    oft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] <<<< ::VersionOfScr
    iptGenerator
        + CategoryInfo          : InvalidOperation: (Microsoft.Power...1bf3856ad364e35:String) [], ParentContainsErrorReco
       rdException
        + FullyQualifiedErrorId : TypeNotFound

    WARNING: Can't generate Export-Module for the current session using Import-PSSession.
    VERBOSE: Connected to TVLSUNHUBCAS02.sunoptical.co.in
    [PS] C:\Windows\system32>

    ===================================================================================

    Restart the PC ,

    IIS Reset 

    Ran the EMTShooter and it not fixed the issue. Can anyone help on this please

    Please note : Am able to connect the ECP without any isssue
    • Edited by rush2ramki Friday, April 21, 2017 9:30 AM
    Friday, April 21, 2017 9:09 AM

Answers

All replies

  • Hi

    Is it only this server that gives the error?

    Have you tried running it from another server with the admin tools installed or another exchange server?

    did you follow all the steps as per below regarding the troubleshooter?

    https://support.microsoft.com/en-us/help/3063897/-connecting-to-the-remote-server-failed-with-the-following-error-message-error-when-you-start-the-exchange-management-shell-or-the-exchange-management-console

    Friday, April 21, 2017 11:23 AM
    Owner
  • Hi Edward

    Yes. this server only giving the problem while connecting the exchange powershell with local host

    Rest of the exchange servers are connecting without any issue

    Yes. i ran EMT and found the event 

    The Exchange Management Troubleshooter is starting.

    The Exchange Management Troubleshooter successfully completed connecting to:
    TVLSUNHUBCAS01.sunoptical.co.in

    But the EMS is not connecting with TVLSUNHUBCAS01.sunoptical.co.in, instead itss connecting to TVLSUNHUBCAS02.sunoptical.co.in


    Friday, April 21, 2017 11:34 AM
  • On the server on which you are currently experiencing the issue can you do the below:

    1. Open Powershell as Administrator

    2. Winrm QC

    3. Enter (Y) and press enter to add exception for WS-MAN in the firewall.

    4. Winrm E Winrm/Config/Listener

    Paste the output after running the command in the 4th step

    Can you also check if you can successfully import Remote Powershell session following the process below:

    1. Open Powershell as Administrator.

    2. 

    $UserCredential = Get-Credential

    3.

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://TVLSUNHUBCAS02.sunoptical.co.in/PowerShell/ -Authentication Kerberos -Credential $UserCredential
    4. 
    Import-PSSession $Session
    For more information on how to connect to remote powershell refer to the link below:
    Connect to Exchange servers using remote PowerShell

    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

    Friday, April 21, 2017 12:11 PM
  • Hi Pavan,

    Thanks for the steps and here is the output

    [PS] C:\Windows\system32>Winrm QC
    WinRM service is already running on this machine.
    WinRM is already set up for remote management on this computer.
    [PS] C:\Windows\system32>Winrm E Winrm/Config/Listener
    Listener
        Address = *
        Transport = HTTP
        Port = 5985
        Hostname
        Enabled = true
        URLPrefix = wsman
        CertificateThumbprint
        ListeningOn = 127.0.0.1, 172.29.137.20, 172.29.137.22, 172.29.137.24, ::1, 2002:ac23:14::ac23:14, 2002:ac23:16::ac23:16, 2
    002:ac23:18::ac23:18, fe80::200:5efe:172.35.0.20%14, fe80::200:5efe:172.35.0.22%16, fe80::200:5efe:172.35.0.24%16

    [PS] C:\Windows\system32>$UserCredential = Get-Credential

    cmdlet Get-Credential at command pipeline position 1
    Supply values for the following parameters:
    Credential
    [PS] C:\Windows\system32>$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://TVLSUNHUBCAS02.sunoptical.co.in/PowerShell/ -Authentication Kerberos -Credential $UserCredential
    [TVLSUNHUBCAS02.sunoptical.co.in] Connecting to remote server failed with the following error message : The WS-Management serv
    ice does not support the request. For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    [PS] C:\Windows\system32>


    Friday, April 21, 2017 12:30 PM
  • Does the Exchange Management console opens fine or do you also get any error on the management console ?

    if you do get any errors can you send the screenshot or the complete error you see on the exchange management console.

    Were you ever able to open Exchange Management shell on this server ? If you did in the past, were there any changes made post which this issue started ?

    can you also see if you have "WINRM IIS EXTENSIONS" Installed ? If you already have them then consider reinstalling them.

    go to start / administrative tools / server manager / features / add features / and check winrm iis extensions / next / next / close.


    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

    Friday, April 21, 2017 12:49 PM
  • Hi Pavan

    Thanks, Exchange Management console  is working / opening without any errors

    WINRM IIS EXTENSIONS is not installed  on the problematic server. but other server which is EMS is working fine , in that WINRM IIS EXTENSIONS is not installed. Thats the big confusion

    WINRM IIS EXTENSIONS - Will it require reboot? - i think NO. Is there any impact of installing WINRM IIS EXTENSIONS on the servers. its Windows Server 2012. Exchnage 2010 is running on it

    Something weird.


    • Edited by rush2ramki Friday, April 21, 2017 1:59 PM
    Friday, April 21, 2017 1:55 PM
  • I am not aware about the windows version being 2012. hold off installing WinRM IIS Extensions.

    What version of exchange is installed on Windows Server 2012?

    is it exchange or just management tools ?


    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

    Friday, April 21, 2017 8:51 PM
  • On the server on which you are currently experiencing the issue can you do the below:

    1. Open Powershell as Administrator

    2. Winrm QC

    3. Enter (Y) and press enter to add exception for WS-MAN in the firewall.

    4. Winrm E Winrm/Config/Listener

    Paste the output after running the command in the 4th step

    Can you also check if you can successfully import Remote Powershell session following the process below:

    1. Open Powershell as Administrator.

    2. 

    $UserCredential = Get-Credential

    3.

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://TVLSUNHUBCAS02.sunoptical.co.in/PowerShell/ -Authentication Kerberos -Credential $UserCredential
    4. 
    Import-PSSession $Session
    For more information on how to connect to remote powershell refer to the link below:
    Connect to Exchange servers using remote PowerShell

    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

    Why are you getting them to configure WinRM ?

    Exchange remoting  =!  Windows Remoting


    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Friday, April 21, 2017 10:28 PM
  • Hi Pavan

    its Exchange 2010 installed on Windows Server 2012

    Sunday, April 23, 2017 5:00 AM
  • service pack ?
    Sunday, April 23, 2017 3:07 PM
  • Hi Pavan

    its Exchange 2010 installed on Windows Server 2012

    Hi rush2ramki,

    Please make sure you have install SP3 for Exchange 2010 on Windows server 2012, because it is only support to install Exchange 2010 SP3 on Windows server 2012 as the following link, if not, update Exchange 2010 to SP3.

    https://technet.microsoft.com/en-us/library/ff728623(v=exchg.150).aspx



    Best Regards,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, April 24, 2017 3:05 AM
    Moderator
  • Hi jim,

    Yes. its Exchange 2010 14.3 - SP3 installed on Windows Server 2012. 



    • Edited by rush2ramki Monday, April 24, 2017 9:22 AM z
    Monday, April 24, 2017 8:55 AM
  • Hi rush2ramki,

    On this specific server, please ensure that the MSExchangePowerShellAppPool application pool is running. If the pool is running, try to recycle it.


    Best Regards,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, April 25, 2017 5:43 AM
    Moderator
  • H jim

    Yes. This was already done and no luck. However i observed the Get-PowerShellVirtualDirectory is not give the result for the problematic Server  

    Name                                                        Server
    ----                                                        ------
    PowerShell (Default Web Site)                               TVLSUNHUBCAS02
    PowerShell-Proxy (Default Web Site)                         TVLSUNHUBCAS02

    But in IIS PowerShell (Default Web Site)  and PowerShell-Proxy (Default Web Site) are both available in the Problem server TVLSUNHUBCAS01

    Tuesday, April 25, 2017 9:32 AM
  • Hi rush2ramki,

    To this issue, we suggest you run AD replication on domain controller, then run “Get-PowerShellVirtualDirectory” to check if you could see the problematic PowerShell virtual directory.

    In addition, please run Exchange 2010 prerequisites to check if the issue persist:
    https://technet.microsoft.com/en-us/library/bb691354(v=exchg.141)


    Best Regards,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, April 26, 2017 1:41 AM
    Moderator
  • Hello Jim and  All

    Thanks for all your updates. 

    The below link resolved my issue. in the Powershell Module (IIS) WSman was not register , i got registered and started working

    http://recover-email.blogspot.in/2014/08/common-powershell-virtual-directory.html

    Many thanks to all  and i had learned a lot

    • Marked as answer by rush2ramki Thursday, April 27, 2017 8:08 AM
    Wednesday, April 26, 2017 2:23 PM
  • Hi rush2ramki,

    Thanks for your back and share your solution to us, you could mark your reply as answer so that someone who has similar issue could find this solution in thread as soon as possible.


    Best Regards,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, April 27, 2017 1:54 AM
    Moderator
  • Hi Jim and All

    WSman was not register in the power shell module i got registered and started working. Reference Link

    http://recover-email.blogspot.in/2014/08/common-powershell-virtual-directory.html

    • Marked as answer by rush2ramki Thursday, April 27, 2017 8:09 AM
    Thursday, April 27, 2017 8:09 AM