Site icon sulli.blog

Office 365 exchange powershell

Quickly Connect to exchange console on Office 365

  1. Open PowerShell session as admin
  2. Store your required credentials in a variable
$Cred = Get-Credential
  1. Enter credentials when prompted
  1. Connect to Exchange online
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  1. Import Session
Import-PSSession $Session -DisableNameChecking

Disk Connect after session

Import-PSSession $Session -DisableNameChecking
Exit mobile version