Always Beyond White Icon Logo Small
Is Your Business Secure?
Take our FREE 2-minute IT Security Scorecard and get instant insights—no strings attached.
👉 Start Assessment
Insights & Guides
Cloud & Collaboration

Install Exchange Online PS Module

IntroductionLearning how to install Exchange Online PowerShell module is an essential skill for any IT administrator managing Microsoft 365 email environments.
Apr 03, 2026
8 min read
install exchange online powershell module guide for IT professionals and SMBs

Introduction

Learning how to install Exchange Online PowerShell module is an essential skill for any IT administrator managing Microsoft 365 email environments. The Exchange Online PowerShell module gives you command-line access to mailboxes, distribution groups, mail flow rules, and dozens of other settings that are difficult or impossible to configure at scale through the admin portal alone. Whether you are managing a small business with fifty users or a mid-sized organization with hundreds of mailboxes, this module dramatically speeds up routine tasks. This guide walks you through everything you need to know to get the module installed, connected, and working reliably.

What Is Install Exchange Online Powershell Module?

The Exchange Online PowerShell module, officially called the EXO V2 or EXO V3 module depending on the version, is a Microsoft-published PowerShell module that allows administrators to connect to Exchange Online and run commands against their Microsoft 365 tenant. It is distributed through the PowerShell Gallery and replaces the older, less secure remote PowerShell connection method that required basic authentication. The module uses modern authentication by default, which means it supports multi-factor authentication, conditional access policies, and certificate-based authentication — all critical security features for any organization that takes identity protection seriously.

When you install the Exchange Online PowerShell module, you are essentially adding a library of specialized cmdlets to your PowerShell environment. These cmdlets let you do things like create and manage mailboxes in bulk, configure anti-spam and anti-malware policies, audit mailbox access, set up shared mailboxes, manage distribution lists, and export mail flow data for compliance reporting. The module is maintained and regularly updated by Microsoft, so new features and security patches are delivered through the same PowerShell Gallery update mechanism you use to install it in the first place. For IT teams at small and mid-sized businesses, this module is one of the most practical tools available for managing Microsoft 365 efficiently.

How Install Exchange Online Powershell Module Works

The installation process relies on PowerShellGet, the package management framework built into modern versions of Windows PowerShell and PowerShell 7. When you run the Install-Module command, PowerShellGet reaches out to the PowerShell Gallery — Microsoft's public repository for PowerShell modules — downloads the Exchange Online Management package, and installs it into a module directory on your local machine. The process handles dependencies automatically, meaning if the module requires other supporting libraries, those get pulled in as well. Once installed, the module sits in your PowerShell module path and can be imported into any new session with Import-Module or called directly when you use one of its cmdlets.

Connecting to Exchange Online after installation involves running the Connect-ExchangeOnline cmdlet, which opens a modern authentication prompt. This prompt supports multi-factor authentication, so your organization's MFA policies apply just as they would when signing into the Microsoft 365 portal through a browser. Behind the scenes, the module establishes a secure REST-based connection to Microsoft's Exchange Online service, which is more reliable and performant than the older WinRM-based remote PowerShell sessions. The connection remains active for your session and can be closed cleanly with Disconnect-ExchangeOnline when you are finished. Understanding this flow helps you troubleshoot connection issues and ensures you are following Microsoft's recommended security practices every time you use the module.

Step-by-Step Guide

  1. Check Your PowerShell Version: Before installing anything, open PowerShell and run $PSVersionTable.PSVersion to confirm you are running Windows PowerShell 5.1 or PowerShell 7.2 or later, as these are the supported versions for the Exchange Online Management module. If you are on an older version, download and install the latest PowerShell release from Microsoft's official GitHub repository before proceeding.
  2. Set the Execution Policy: Run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser in an elevated PowerShell window to allow locally created scripts and signed remote scripts to execute on your machine. This is a required step because the default execution policy on many Windows systems is set to Restricted, which would block the module installation entirely.
  3. Install or Update PowerShellGet: Run Install-Module PowerShellGet -Force -AllowClobber to make sure you have the latest version of the package manager before attempting to install the Exchange Online module. An outdated PowerShellGet can cause installation errors or pull down older, unsupported versions of the module.
  4. Install the Exchange Online Management Module: Run Install-Module -Name ExchangeOnlineManagement -AllowClobber -Force in an elevated PowerShell session to download and install the latest version of the module from the PowerShell Gallery. If prompted to trust the PSGallery repository, type Y and press Enter to confirm and allow the installation to continue.
  5. Verify the Installation: After installation completes, run Get-Module -Name ExchangeOnlineManagement -ListAvailable to confirm the module is present and check which version was installed. You should see the module listed with its version number, confirming that the installation was successful and the module is available in your PowerShell environment.
  6. Connect to Exchange Online: Run Connect-ExchangeOnline -UserPrincipalName youradmin@yourdomain.com, replacing the UPN with your Microsoft 365 admin account address, to open the modern authentication sign-in prompt. Complete the MFA challenge if your account requires it, and once authenticated, your PowerShell session will be connected to your Exchange Online tenant and ready for use.
  7. Test With a Basic Cmdlet: Run Get-Mailbox -ResultSize 10 to retrieve a list of the first ten mailboxes in your organization and confirm that the connection is working correctly. If the command returns mailbox data, your installation and connection are fully functional and you can begin running administrative tasks against your Exchange Online environment.

Exchange Online PowerShell Module Version Comparison

FeatureEXO V1 (Legacy)EXO V2EXO V3
Authentication MethodBasic AuthenticationModern AuthenticationModern Authentication
MFA SupportNoYesYes
REST-Based CmdletsNoPartialFull REST API
Certificate-Based AuthNoYesYes
PowerShell 7 SupportNoLimitedFull Support

Best Practices

  • Use a Dedicated Admin Account: Always connect to Exchange Online using a dedicated administrator account rather than your personal Microsoft 365 account to maintain a clear audit trail and limit the blast radius if credentials are ever compromised.
  • Keep the Module Updated: Run Update-Module -Name ExchangeOnlineManagement regularly to ensure you have the latest security patches and feature improvements from Microsoft.
  • Disconnect After Each Session: Always run Disconnect-ExchangeOnline at the end of each administrative session to close the connection cleanly and avoid leaving authenticated sessions open unnecessarily.
  • Use Certificate-Based Authentication for Automation: When running scheduled scripts or automation pipelines, configure certificate-based authentication instead of interactive sign-in to avoid relying on stored credentials in plain text.
  • Restrict Module Installation to Admins: Install the module using the AllUsers scope only on machines where all users are trusted administrators, and prefer CurrentUser scope on shared or general-purpose workstations to limit exposure.

Frequently Asked Questions

What Are the System Requirements for the Exchange Online PowerShell Module?

The Exchange Online Management module requires Windows PowerShell 5.1 or PowerShell 7.2 or later running on Windows 10, Windows 11, Windows Server 2016, or newer server operating systems. macOS and Linux are also supported when using PowerShell 7, making the module cross-platform for organizations with mixed environments. You will also need a Microsoft 365 account with appropriate administrative permissions, such as Exchange Administrator or Global Administrator, to connect and run cmdlets successfully. Ensure your machine has outbound internet access on port 443, as the module communicates with Microsoft's Exchange Online service over HTTPS.

Why Does My Install-Module Command Fail With a Repository Error?

This error typically occurs when your machine does not trust the PowerShell Gallery as a package source, or when PowerShellGet is outdated and cannot communicate properly with the repository. You can resolve this by running Set-PSRepository -Name PSGallery -InstallationPolicy Trusted before attempting the installation again. Another common cause is a proxy or firewall blocking outbound access to powershellgallery.com, so check with your network team if the trust policy change does not resolve the issue. Updating PowerShellGet to the latest version before installing the Exchange Online module also resolves many repository-related errors.

Can I Install the Module Without an Internet Connection?

Yes, it is possible to install the Exchange Online Management module in an offline or air-gapped environment by first downloading the module package from the PowerShell Gallery on an internet-connected machine using Save-Module, then transferring the files to the offline machine and installing them using Install-Module with the -Source parameter pointing to the local path. You will need to ensure all module dependencies are also downloaded and transferred, as the module relies on supporting packages that must be present. This approach is common in highly regulated environments where internet access from administrative workstations is restricted. Microsoft's documentation covers the full offline installation process in detail for organizations that need it.

How Do I Update the Exchange Online PowerShell Module?

Updating the module is straightforward — open an elevated PowerShell session and run Update-Module -Name ExchangeOnlineManagement to download and install the latest version from the PowerShell Gallery. If you have multiple versions installed, you can remove older ones with Uninstall-Module -Name ExchangeOnlineManagement -RequiredVersion followed by the specific version number you want to remove. Microsoft releases updates to the module periodically to add new cmdlets, improve performance, and address security issues, so checking for updates monthly is a reasonable cadence for most organizations. You can always check your currently installed version by running Get-InstalledModule -Name ExchangeOnlineManagement.

Is the Exchange Online PowerShell Module the Same as the MSOnline or AzureAD Module?

No, these are separate modules that serve different purposes within the Microsoft 365 ecosystem. The Exchange Online Management module is specifically for managing Exchange Online mailboxes, mail flow, and email policies, while the MSOnline and AzureAD modules are used for managing Azure Active Directory users, groups, licenses, and tenant-level identity settings. Microsoft has been deprecating the MSOnline and AzureAD modules in favor of the Microsoft Graph PowerShell SDK, but the Exchange Online Management module remains the recommended tool for Exchange-specific administration. For comprehensive Microsoft 365 management, many administrators install both the Exchange Online module and the Microsoft Graph PowerShell SDK to cover all their administrative needs.

If your team is spending too much time navigating PowerShell module installations, connection issues, or Exchange Online administration tasks, Always Beyond can take that burden off your plate with fully managed IT services tailored for small and mid-sized businesses. Our team handles Microsoft 365 setup, ongoing administration, and security hardening so your staff can focus on running your business instead of troubleshooting cmdlets. To learn how we can simplify your Microsoft 365 management, contact Always Beyond today.

On this page

Ready to Make IT One Less Thing to Worry About?

Book a no-pressure consultation to see how Always Beyond can help you simplify, secure, and future-proof your IT.

See exactly how your current IT setup measures up to our Hack Free standards. Enter your business email to receive:

  • Free 10-point security scorecard for your business
  • Complete Hack Free Guarantee eligibility checklist
  • Exclusive case studies from our protected clients