What do you need to know before you begin?
Windows 10, Windows 8.1, Windows 8 or Windows 7 Service Pack 1 (SP1)
Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 SP1
Note: Use a 64-bit version of Windows. Support for the 32-bit version the Microsoft Azure Active Directory Module for Windows PowerShell was discontinued in October, 2014.
  Note: Open PowerShell from start menu and use below commands for further process. 
Command:      Get-Module -ListAvailable -Name MSOnline
Expected output:
     Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules
ModuleType Version    Name                                ExportedCommands                                                                               
---------- -------    ----                                ----------------                                                                               
Manifest   1.1.166.0  MSOnline                            {Get-MsolDevice, Remove-MsolDevice, Enable-MsolDevice, Disable-MsolDevice...}    
Command:     Import-Module -Name MSOnline
These steps are required once on your computer, not every time you connect. 
However, you'll likely need to install newer versions of the software periodically.
Install the 64-bit version of the Microsoft Online Services Sign-in Assistant: Microsoft Online Services Sign-in Assistant for IT Professionals RTW.