Connect-ExchangeOnline Powershell WinRM Issue

Iron Contributor

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.

@Vasil Michev 

 

I have run all the commands shown at this https://gist.github.com/mapbutcher/6016861

also i have two identical servers on one all is working fine

and on the one i am facing this issue is only with ExchangeOnline whereas other like connect-AzureAD

Connect-MsolService etc... all are working fine,

Which tool can help further diagnose ??

 

 

 

 
 

 

 

BR,

/HS

@Vasil Michev 

 

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

Check your proxy/firewall settings and make sure the WinRM service is running: https://docs.microsoft.com/en-us/exchange/troubleshoot/connecting-to-the-service/winrm-cannot-proces...

@Vasil Michev  I am also facing this issue and have checked the firewall

I am facing the same issue any solution please @grammarian