Hi Richard,
The commands that you typed are about connection to Office 365, not Exchange Online.
About using Powershell in Exchange Online, please see link below for your reference: http://help.outlook.com/en-us/140/cc546278.aspx .
Thanks,
Jacky Ding