Exchange Powershell Not working

Sachin Shinde 1 Reputation point
2021-12-09T08:14:11.823+00:00

Hi,
We have Windows Server 2016 & Exchange Server 2016 Standard installed on same server. Windows Server is having role of Active Directory, DNS, Global catlog and all.

When we start Exchange Powershell on server it wont connect and gives below error.

VERBOSE: Connecting to Hostname.Domain.COM.
New-PSSession : [hostname.domain.com] Connecting to remote server hostname.domain.com failed with the
following error message : WinRM cannot process the request. The following error occurred while using Kerberos
authentication: Cannot find the computer hostname.domain.COM. Verify that the computer exists on the network
and that the name provided is spelled correctly. 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 : NetworkPathNotFound,PSSessionOpenFailed
    VERBOSE: Connecting to hostname.domain.COM.
    New-PSSession : [hostname.domain.com] Connecting to remote server hostname.domain.com failed with the
    following error message : WinRM cannot process the request. The following error occurred while using Kerberos
    authentication: Cannot find the computer hostname.domain.COM. Verify that the computer exists on the network
    and that the name provided is spelled correctly. 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 : NetworkPathNotFound,PSSessionOpenFailed
    VERBOSE: Connecting to hostname.domain.COM.
    New-PSSession : [hostname.domain.com] Connecting to remote server hostname.domain.com failed with the
    following error message : WinRM cannot process the request. The following error occurred while using Kerberos
    authentication: Cannot find the computer hostname.domain.COM. Verify that the computer exists on the network
    and that the name provided is spelled correctly. 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 : NetworkPathNotFound,PSSessionOpenFailed
    VERBOSE: Connecting to hostname.domain.COM.
    New-PSSession : [hostname.domain.com] Connecting to remote server hostname.domain.com failed with the
    following error message : WinRM cannot process the request. The following error occurred while using Kerberos
    authentication: Cannot find the computer hostname.domain.COM. Verify that the computer exists on the network
    and that the name provided is spelled correctly. 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 : NetworkPathNotFound,PSSessionOpenFailed
    VERBOSE: Connecting to hostname.domain.COM.
    New-PSSession : [hostname.domain.com] Connecting to remote server hostname.domain.com failed with the
    following error message : WinRM cannot process the request. The following error occurred while using Kerberos
    authentication: Cannot find the computer hostname.domain.COM. Verify that the computer exists on the network
    and that the name provided is spelled correctly. 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 : NetworkPathNotFound,PSSessionOpenFailed
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: hostname.domain.com
    VERBOSE: Connecting to hostname.domain.com.
    New-PSSession : [hostname.domain.com] Connecting to remote server hostname.domain.com failed with
    the following error message : WinRM cannot process the request. The following error occurred while using
    Kerberos authentication: Cannot find the computer hostname.domain.com. Verify that the computer exists on
    the network and that the name provided is spelled correctly. 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], PSR
    emotingTransportException
  • FullyQualifiedErrorId : NetworkPathNotFound,PSSessionOpenFailed
    [PS] C:\Windows\system32>

When we ping host name from server it shows result (Reply From : : 1 time <1ms)

We have unbind and disabled IPV6 from Network card.

Thanks,
Sachin Shinde

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Manu Philip 20,491 Reputation points MVP Volunteer Moderator
    2021-12-09T09:06:35.333+00:00

    Have you connected to the server using domain login? check it using the command whoami in command prompt. If not, re-login as domain user with proper privilege and check Exchange PS again

    1 person found this answer helpful.

  2. KyleXu-MSFT 26,396 Reputation points
    2021-12-10T06:58:07.033+00:00

    @Sachin Shinde

    Do you install Exchange server on the DC? It isn't suggested which may cause many issues.

    About this issue, I would suggest you try to ping the hostname.domain.com first, mare there doesn't exist issue with DNS record.

    Then try to connect to Exchange on-premises with remote PowerShell, check whether there exists an issue with EMS virtual directory.

    If you could connect to Exchange with remote PowerShell, you can use command below to check configuration for EMS virtual directory:

    Get-PowerShellVirtualDirectory -Server Exch2016 | fl  
    

    156534-qa-kyle-14-52-07.png

    If you cannot connect to Exchange with remote PowerShell, you could take step below to recreate EMS virtual directory:

    1. Run PowerShell with administrator permission.
    2. Import manage module with command below: add-pssnapin Microsoft.Exchange.Management.PowerShell.SnapIn
    3. Remove old EMS virtual directory: Get-PowerShellVirtualDirectory -Server Exch2016 | Remove-PowerShellVirtualDirectory
    4. Create a new one with command below: New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False

    Then run IISReset in PowerShell, after that, try to open EMS again.


    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.



Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.