This article will show you how to connect to Office 365 using PowerShell and start managing your users and licenses using PowerShell.
Before you can start managing Office 365 users using PowerShell you will need to download and Install a few PowerShell modules.
If you need to connect to Microsoft Azure see How To Manage Microsoft Azure VMs Using PowerShell and Manage Azure Active Directory Using PowerShell.
To start you will need a Windows 7+ machine of Windows Server 2008+.
Download the packages below:
https://www.microsoft.com/en-us/download/details.aspx?id=41950
http://go.microsoft.com/fwlink/p/?linkid=236297
https://www.microsoft.com/en-us/download/details.aspx?id=35588
https://www.microsoft.com/en-us/download/details.aspx?id=39366
When done, Open PowerShell and type:
connect-msolservice
Enter your Office 365 User Name and Password.
To see all the available cmdlets type:
get-help *msol* | Out-GridView