Open Windows PowerShell as an administrator (use Run as administrator) on any machine which has Internet connection.
Run the command below, and enter your Office 365 admin account credentials.
$credential = Get-CredentialIf the Azure Active Directory PowerShell has not been installed on the machine, then you can install the module with the Install-Module cmdlet:
Install-Module MSOnline
Import-Module MsOnline
Run the command below to connect to Office 365.
Connect-MsolService -Credential $credential
Overview
Content Tools