Login to O365
From MyWiki
In Powershell load the Quest snapin
Add-PSSnapin Quest.ActiveRoles.ADManagement
$pw = read-host "Enter password" -AsSecureString
connect-QADService -service 'dc02.example.com'-ConnectionAccount 'DOMAIN\useracc'-ConnectionPassword $pw
To disconnect at the end of session : Disconnect-QADService