Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.6-Preview5 -AllowPrerelease
Running this failed with an error that it `‘Cannot convert value “2.0.6-Preview5” to type “System.Version”. Error: “Input string was not in a correct format.”
The solution is to update PowerShellGet, close and then open PowerShell, and then re-run the command. To update PowerShellGet:
Install-Module PowerShellGet –Repository PSGallery –Force
For reference, to check the currently installed version of the EOL PS module:
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement