Using WINDOWS POWERSHELL to connect to Office 365

Open Windows POWERSHELL as a administrator (Right click on it and “RUN AS ADMIN”). Then type the following commands within the powershell

(YOU CAN CUT AND PASTE) – You will be prompted for your admin email address and password to Office 365

Set-Executionpolicy -ExecutionPolicy Unrestricted
 
$UserCredential = Get-Credential

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