Here is a newest method as of right now. There was a warning seen when using a previous method, stating that previous methods will no longer be available fairly soon.
Set-Executionpolicy Bypass -Scope Process Install-Module PowerShellGet -Force -AllowClobber Install-Module ExchangeOnlineManagement -Force -AllowClobber
and then, changing the below appropriately:
Connect-ExchangeOnline -UserPrincipalName adminuser@domain.com