function EXO { $LiveCred = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection Import-PSSession $Session } function noEXO {Get-PSSession | ? {$_.computername -like "*.outlook.com"} | remove-pssession}