Install-Module -Name PackageManagement -Repository PSGallery -Force
Install-Module -Name PowerShellGet -Repository PSGallery -Force
Install-Module PowerShellGet -AllowPrerelease -Force -Repository PSGallery -SkipPublisherCheck
exit #restart powershell
Install-Module -Name ExchangeOnlineManagement -AllowPrerelease
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName navin@contoso.com -ShowProgress $true
https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps