Download and install the following:
- Install Windows PowerShell 3.0 from Windows Management Framework 3.0.
- Install the SharePoint Online Management Shell from the Microsoft Download Center.
- Open the shell
- Run Connect-SPOService.
For example, Connect-SPOService -Url https://letsExchange-admin.sharepoint.com -credential [email protected]
- Url is the URL of the SharePoint Online Administration Center.
- Credential is the user name of global admin .
Try it out! For example, run Get-SPOSite to get a list of all sites
Source : https://technet.microsoft.com/en-us/library/fp161372.aspx