To connect the PowerShell to Office 365 you need:
Microsoft Online Services Sign-In Assistant
https://www.microsoft.com/en-us/download/details.aspx?id=39267
Azure Active Directory Module for Windows PowerShell
http://go.microsoft.com/fwlink/p/?linkid=236297
Then a new shortcut will e created at the desktop, the Windows Azure Active Directory Module for Windows PowerShell. Run it and run: Connect-MsolService
A pop up will ask you for credentials and that’s all, you are connected
Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.