Forum Discussion
Get-EXO cmdlets all cause errors.
When connecting to Exchange Online and running an EXO command I am seeing some strange errors which cause the connection to Exchange online to fail.
connect-exchangeonline
----------------------------------------------------------------------------------------
This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets which d
oesn't require WinRM for Client-Server communication. You can now run these cmdlets after
turning off WinRM Basic Auth in your client machine thus making it more secure.
Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parit
y with the RPS (V1) cmdlets.
V3 cmdlets in the downloaded module are resilient to transient failures, handling retries
and throttling errors inherently.
REST backed EOP and SCC cmdlets are also available in the V3 module. Similar to EXO, the c
mdlets can be run without WinRM basic auth enabled.
For more information check https://aka.ms/exov3-module
----------------------------------------------------------------------------------------
Get-EXOMailbox (email address removed)
Get-EXOMailbox : The underlying connection was closed: An unexpected error occurred on a
receive.
At line:1 char:1
+ Get-EXOMailbox email address removed for privacy reasons
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ProtocolError: (:) [Get-EXOMailbox], DataServiceTransportE
xception
+ FullyQualifiedErrorId : The underlying connection was closed: An unexpected error
occurred on a receive.,Microsoft.Exchange.Management.RestApiClient.GetExoMailbox
Now I need to open a new powershell window and reconnect. I try to run a diffrent command:
Get-EXOMailboxStatistics (email address removed)
Get-EXOMailboxStatistics : The underlying connection was closed: An unexpected error
occurred on a receive.. The underlying connection was closed: An unexpected error
occurred on a receive.. The specified value is not valid in the 'SslProtocolType'
enumeration.
Parameter name: sslProtocolType.
At line:1 char:1
+ Get-EXOMailboxStatistics email address removed for privacy reasons
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ProtocolError: (:) [Get-EXOMailboxStatistics], Exception
+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.Exchange.Management
.RestApiClient.GetExoMailboxStatistics
There was a suggestion in a diffrent form to connect to security and compliance first.. That did not work.
Any ideas?
6 Replies
- ShannonchinnaCopper ContributorAre you using a proxy?
- DFOTACopper Contributor
Shannonchinna No but I do think it has something to do with the modules I have installed or at least the version. Leaning a lot towards the powershell get module.
- LainRobertsonSilver Contributor
The error relates directly to TLS, with the specific statement that:
The specified value is not valid in the 'SslProtocolType' enumeration.
TLS 1.2 is the minimum requirement for the current ExchangeOnlineManagement module.
What do you get if you run the following?
[System.Enum]::GetNames([System.Security.Authentication.SslProtocols]);If you're running a sufficiently-patched Windows 10 or Server 2019 build or later, you should see at least:
Cheers,
Lain