How to connect to Office 365 with PowerShell

Before connecting for the first time, enable Windows PowerShell to run signed scripts: Set-ExecutionPolicy RemoteSigned Every time you want to connect, run the following commands: $UserCredential = Get-Credential (enter your Office 365 username & password) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session And don’t forget to close your […]

How to connect to Office 365 with PowerShell Read More »