Skip to content

Instantly share code, notes, and snippets.

@kurtisdunn
Created August 13, 2019 04:08
Show Gist options
  • Save kurtisdunn/3fcddf5831bf76ddde6682bc3e599d0d to your computer and use it in GitHub Desktop.
Save kurtisdunn/3fcddf5831bf76ddde6682bc3e599d0d to your computer and use it in GitHub Desktop.
Connect to O365 exchange console.
# Set User details
$UserCredential = Get-Credential

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

# Import PS Sesion
Import-PSSession $session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment