This PowerShell script will install MSOnline and AzureAD modules for Office 365
Install-Module MSOnline
Install-Module AzureAD
However, using ADManager Plus, along with managing your Active Directory objects, you can simply manage your Office 365 accounts and get instant reports from a single console.
Before you set out to add an Office 365 account in ADManager Plus, ensure that you MSOnline PowerShell module for Azure Active Directory is also installed on the machine where ADManager Plus is installed.
For AD User Management
For AD User Reporting
For GPO Management
For Password Management
For AD Group Management
For File Access Management
For AD Computer Management
For Office 365 Management
For Exchange Management