Skip to content

Installing 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
    

  2. Check if you already have the PowerShell NuGet module installed

    Get-Module PowerShellGet -ListAvailable
    

  3. Install the latest version of the PowerShell NuGet module

    Install-Module PowerShellGet -Force -AllowClobber
    

  4. Install the Exchange Online PowerShell Module

    Install-Module -Name ExchangeOnlineManagement
    

  5. 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
    

  6. Connect to Exchange Online

    Connect-ExchangeOnline -UserPrincipalName admin@contoso.com -ShowBanner:$false
    

  7. Disconnect from Exchange Online when done

    Disconnect-ExchangeOnline -Confirm:$false