Powershell – login to Office 365

 

** If not installed :  Install-Module -Name ExchangePowerShell

 

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

Connect-ExchangeOnline

Set-RemoteDomain Default -TNEFEnabled $false