User Tools

Site Tools


internet:mail:exchange:exchange_o365_powershell

This is an old revision of the document!


Connect to Office 365 Outlook via PowerShell

  • On the machine you are connecting from install the module.

https://www.microsoft.com/en-us/download/details.aspx?id=41950

  • Open PowerShell run as administrator.
  • Allow remote signing.
Set-ExecutionPolicy RemoteSigned**
  • Set cached credentials. You need the global admin account credentials
$LiveCred = Get-Credential
  • Setup parameters for the session.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  • Open a session.
Import-PSSession $Session
  • Close a session.
Remove-PSSession $Session
internet/mail/exchange/exchange_o365_powershell.1547068274.txt.gz · Last modified: 2019/01/09 14:11 by jcooper