If you are using multi-factor authentication, it is not possible to use the old method of connecting to Exchange Online. You will have to install the Exchange Online Remote PowerShell Module, and use the Connect-EXOPSSession cmdlet to connect.
You can install the PowerShell module by following these instructions:
A shortcut will be placed on your desktop which will start PowerShell with the required modules.
Start Exchange Online Remote PowerShell Module (Microsoft Corporation → Microsoft Exchange Online Remote PowerShell Module).
Use the cmdlet Connect-EXOPSSession and your Office 365 account (your username, in UPN-format) to connect to Exchange Online:
Connect-EXOPSSession -UserPrincipalName email@example.com
You will be prompted for your credentials. If MFA is enabled, the request to validate your login will appear as well.
After successfully logging on, you will be able to run PowerShell cmdlets like before.