Forum Discussion

Himanshu Singh's avatar
Himanshu Singh
Iron Contributor
Feb 07, 2020

Connect-ExchangeOnline Powershell WinRM Issue

PS C:\> Connect-ExchangeOnline

 

----------------------------------------------------------------------------

We have released new management cmdlets which are faster and more reliable.

 

|--------------------------------------------------------------------------|

|    Old Cmdlets                    |    New/Reliable/Faster Cmdlets       |

|--------------------------------------------------------------------------|

|    Get-CASMailbox                 |    Get-EXOCASMailbox                 |

|    Get-Mailbox                    |    Get-EXOMailbox                    |

|    Get-MailboxFolderPermission    |    Get-EXOMailboxFolderPermission    |

|    Get-MailboxFolderStatistics    |    Get-EXOMailboxFolderStatistics    |

|    Get-MailboxPermission          |    Get-EXOMailboxPermission          |

|    Get-MailboxStatistics          |    Get-EXOMailboxStatistics          |

|    Get-MobileDeviceStatistics     |    Get-EXOMobileDeviceStatistics     |

|    Get-Recipient                  |    Get-EXORecipient                  |

|    Get-RecipientPermission        |    Get-EXORecipientPermission        |

|--------------------------------------------------------------------------|

 

To get additional information, run: Get-Help Connect-ExchangeOnline

Please send your feedback and suggestions to exocmdletpreview@service.microsoft.com

----------------------------------------------------------------------------

 

New-ExoPSSession : Connecting to remote server outlook.office365.com failed with the following error message : WinRM cannot

complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and

that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall

exception for public profiles limits access to remote computers within the same local subnet. For more information, see the

about_Remote_Troubleshooting Help topic.

At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\0.3555.1\ExchangeOnlineManagement.psm1:393 char:30

+ ... PSSession = New-ExoPSSession -ExchangeEnvironmentName $ExchangeEnviro ...

+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ResourceUnavailable: (:) [New-ExoPSSession], PSRemotingTransportException

    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.Exchange.Management.

   ExoPowershellSnapin.NewExoPSSession

6 Replies

  • As the message suggests, verify your WinRM settings, including those related to Basic authentication.

    • Himanshu Singh's avatar
      Himanshu Singh
      Iron Contributor

      VasilMichev 

       

      PS C:\> Connect-ExchangeOnline

      ----------------------------------------------------------------------------
      We have released new management cmdlets which are faster and more reliable.

      |--------------------------------------------------------------------------|
      | Old Cmdlets | New/Reliable/Faster Cmdlets |
      |--------------------------------------------------------------------------|
      | Get-CASMailbox | Get-EXOCASMailbox |
      | Get-Mailbox | Get-EXOMailbox |
      | Get-MailboxFolderPermission | Get-EXOMailboxFolderPermission |
      | Get-MailboxFolderStatistics | Get-EXOMailboxFolderStatistics |
      | Get-MailboxPermission | Get-EXOMailboxPermission |
      | Get-MailboxStatistics | Get-EXOMailboxStatistics |
      | Get-MobileDeviceStatistics | Get-EXOMobileDeviceStatistics |
      | Get-Recipient | Get-EXORecipient |
      | Get-RecipientPermission | Get-EXORecipientPermission |
      |--------------------------------------------------------------------------|

      To get additional information, run: Get-Help Connect-ExchangeOnline
      Please send your feedback and suggestions to exocmdletpreview@service.microsoft.com
      ----------------------------------------------------------------------------

      New-ExoPSSession : Connecting to remote server outlook.office365.com 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.
      At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\0.3555.1\ExchangeOnlineManagement.psm1:393 char:30
      + ... PSSession = New-ExoPSSession -ExchangeEnvironmentName $ExchangeEnviro ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : ResourceUnavailable: (:) [New-ExoPSSession], PSRemotingTransportException
      + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession

      PS C:\> winrm get winrm/config/client/auth
      Auth
      Basic = true
      Digest = true
      Kerberos = true
      Negotiate = true
      Certificate = true
      CredSSP = false


      PS C:\> winrm get winrm/config/client/auth
      Auth
      Basic = true
      Digest = true
      Kerberos = true
      Negotiate = true
      Certificate = true
      CredSSP = false


      PS C:\> Connect-ExchangeOnline

      ----------------------------------------------------------------------------
      We have released new management cmdlets which are faster and more reliable.

      |--------------------------------------------------------------------------|
      | Old Cmdlets | New/Reliable/Faster Cmdlets |
      |--------------------------------------------------------------------------|
      | Get-CASMailbox | Get-EXOCASMailbox |
      | Get-Mailbox | Get-EXOMailbox |
      | Get-MailboxFolderPermission | Get-EXOMailboxFolderPermission |
      | Get-MailboxFolderStatistics | Get-EXOMailboxFolderStatistics |
      | Get-MailboxPermission | Get-EXOMailboxPermission |
      | Get-MailboxStatistics | Get-EXOMailboxStatistics |
      | Get-MobileDeviceStatistics | Get-EXOMobileDeviceStatistics |
      | Get-Recipient | Get-EXORecipient |
      | Get-RecipientPermission | Get-EXORecipientPermission |
      |--------------------------------------------------------------------------|

      To get additional information, run: Get-Help Connect-ExchangeOnline
      Please send your feedback and suggestions to exocmdletpreview@service.microsoft.com
      ----------------------------------------------------------------------------

      New-ExoPSSession : Connecting to remote server outlook.office365.com 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.
      At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\0.3555.1\ExchangeOnlineManagement.psm1:393 char:30
      + ... PSSession = New-ExoPSSession -ExchangeEnvironmentName $ExchangeEnviro ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : ResourceUnavailable: (:) [New-ExoPSSession], PSRemotingTransportException
      + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession

Resources