New-ExoPSSesion: Error al conectarse al servidor remoto outlook.office365.com
En algunos casos, verá el siguiente mensaje de error al conectarse a Exchange Online utilizando el módulo EXO2 PowerShell:
New-ExoPSSession : Connecting to remote server outlook.office365.com failed with the following error message :
The client cannot connect to the destination specified in the request.
Verify that the service on the destination is running and is accepting requests.
Consult the logs and documentation for the WS-Management service running on the destination,
most commonly IIS or WinRM.
If the destination is the WinRM service, run the following command on the destination to analyze and configure
the WinRM service: "winrm quickconfig".
For more information, see the about_Remote_Troubleshooting Help topic.
Acceda al entorno Exchange en la nube de Microsoft y verifique que el servicio de administración WS se esté ejecutando. ?
Al contrario de lo que indica este mensaje de error, naturalmente debería buscar la causa del error en su sistema local.
Puede haber varias causas por las cuales su sistema no puede completar la solicitud de conexión.
Un problema podría ser una configuración de proxy no válida. Si, por ejemplo, está jugando con Fiddler u otras herramientas y configurando la configuración del proxy local, podría bloquear accidentalmente la solicitud de conexión de EXO.
Compruebe si hay configuraciones de proxy falsas usando el siguiente comando:
PS C:\> netsh winhttp show proxy
Current WinHTTP proxy settings:
Proxy Server(s) : localhost:8888
Bypass List : (none)Si encuentra alguna configuración de proxy activa (no válida), puede limpiarla usando el siguiente comando:
PS C:\> netsh winhttp reset proxy
Current WinHTTP proxy settings:
Direct access (no proxy server).
PS C:\> netsh winhttp show proxy
Current WinHTTP proxy settings:
Direct access (no proxy server).Una vez eliminadas estas configuraciones, deberías volver al negocio:
PS C:\WINDOWS\system32> Connect-ExchangeOnline
----------------------------------------------------------------------------
The module allows access to all existing remote PowerShell (V1) cmdlets in addition to
the 9 new, faster, and more reliable cmdlets.
|--------------------------------------------------------------------------|
| 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 or check
https://aka.ms/exops-docs
Send your product improvement suggestions and feedback to exocmdletpreview@service.microsoft.com.
For issues related to the module, contact Microsoft support.
Don't use the feedback alias for problems or support issues.
----------------------------------------------------------------------------