Skip to content

Install the Exchange Online PowerShell Module

https://lazyadmin.nl/powershell/install-exchange-online-powershell-module/

  1. Set the Execution Policy for your computer to allow running RemoteSigned modules
Set-ExecutionPolicy RemoteSigned
  1. Check if you already have the PowerShell NuGet module installed
Get-Module PowerShellGet -ListAvailable
  1. Install the latest version of the PowerShell NuGet module
Install-Module PowerShellGet -Force -AllowClobber
  1. Install the Exchange Online PowerShell Module
Install-Module -Name ExchangeOnlineManagement
  1. If you can't (or don't want to) open your PowerShell/Terminal with elevated permissions, you can install it for the Current User
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser
  1. Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName admin@contoso.com -ShowBanner:$false
  1. Disconnect from Exchange Online when done
Disconnect-ExchangeOnline -Confirm:$false