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

How to Install Exchange Online PowerShell Module

Learn how to install the Exchange Online PowerShell module (ExchangeOnlineManagement) step by step on Windows, macOS, and Linux. Covers prerequisites, troubleshooting, updates, and best practices for IT admins managing Microsoft 365.
Mar 25, 2026
8 min read
Exchange Online PowerShell module installation guide for Microsoft 365 administrators

What Is the Exchange Online PowerShell Module?

The Exchange Online PowerShell module (ExchangeOnlineManagement) is a Microsoft-maintained PowerShell module that gives administrators command-line access to Exchange Online, the cloud email service included in Microsoft 365. It replaces the deprecated basic authentication remote PowerShell method with modern authentication, supporting multi-factor authentication (MFA), certificate-based authentication, and REST API-backed cmdlets for faster, more secure management.

If your organization uses Microsoft 365 for email, installing this module is the first step toward automating mailbox provisioning, configuring mail flow rules, managing permissions, and running bulk operations that would take hours through the Exchange admin center GUI.

The current version is EXO V3, which Microsoft actively maintains and requires for all Exchange Online PowerShell connections. The older V2 and basic auth methods have been fully retired.

Prerequisites Before You Install

Before running the install command, verify that your environment meets these requirements. Skipping this step is the most common reason installations fail.

PowerShell Version

The ExchangeOnlineManagement module supports Windows PowerShell 5.1 and PowerShell 7.4 or later. On macOS and Linux, PowerShell 7.4+ is required — Windows PowerShell 5.1 is not available on those platforms.

Check your current version by running:

$PSVersionTable.PSVersion

If you need to upgrade, download PowerShell 7 from Microsoft or install it with winget install Microsoft.PowerShell on Windows 10/11.

Operating System Compatibility

The module works on Windows 10/11, Windows Server 2016 and later, macOS, and most Linux distributions that support PowerShell 7. On macOS, you also need OpenSSL installed, and on both macOS and Linux, the PSWSMan module is required for remote session support.

.NET Framework

On Windows, version 3.5.0 and later of the module requires .NET Framework 4.7.2 or later. Most current Windows installations already meet this requirement. PowerShell 7 includes its own .NET runtime, so no separate installation is needed when using PS7.

Execution Policy

Windows clients (Windows 10/11) ship with a Restricted execution policy by default, which blocks module installation. Set it to RemoteSigned:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Windows Server uses RemoteSigned by default, so you can skip this step on servers. Linux and macOS use an unrestricted policy by default.

PowerShellGet and PackageManagement

The ExchangeOnlineManagement module installs from the PowerShell Gallery, which requires the PowerShellGet and PackageManagement modules. Update them first:

Install-Module PowerShellGet -Force -AllowClobber

Close and reopen your PowerShell window after updating PowerShellGet to load the new version.

Admin Permissions

To install the module for all users on the machine, you need an elevated PowerShell window (Run as Administrator). To install only for your current user account, use the -Scope CurrentUser flag — no elevation required.

Once your team is comfortable managing Exchange Online from the command line, connecting to other Microsoft 365 admin tools becomes second nature. Our guide on connecting to Exchange Online PowerShell covers the full authentication and session workflow.

Step-by-Step: Install the ExchangeOnlineManagement Module

With prerequisites confirmed, the installation itself takes one command. Here is the complete process for Windows, macOS, and Linux.

Install on Windows

Open PowerShell as Administrator (right-click, Run as Administrator) and run:

Install-Module -Name ExchangeOnlineManagement

When prompted about an untrusted repository (PSGallery), type Y and press Enter. To skip all prompts and force the installation silently:

Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber

To install only for the current user (no admin rights needed):

Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser

Install on macOS

Open Terminal and launch PowerShell 7:

pwsh

Then install the PSWSMan module (required for remote sessions) and the Exchange Online module:

Install-Module PSWSMan -Scope CurrentUser
sudo pwsh -Command "Install-WSMan"
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser

Make sure OpenSSL is installed. On macOS with Homebrew: brew install openssl.

Install on Linux

Open your terminal and start PowerShell 7:

pwsh

Install the PSWSMan module and the Exchange Online module:

Install-Module PSWSMan -Scope CurrentUser
sudo pwsh -Command "Install-WSMan"
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser

Note: If you are behind a proxy server, you need EXO V3 (version 3.0.0 or later). Earlier versions do not support proxy connections on Linux.

Install a Specific or Pre-Release Version

To install a specific version (useful for pinning in production scripts):

Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.7.0

To install a pre-release version for testing upcoming features:

Install-Module -Name ExchangeOnlineManagement -AllowPrerelease

Verify the Installation

After installation, confirm the module is available and check the version number:

Get-Module ExchangeOnlineManagement -ListAvailable | Select-Object Name, Version, ModuleBase

You should see output showing the module name, version (3.x.x), and the directory where it was installed. If the module is in C:\Program Files\WindowsPowerShell\Modules, it was installed for all users. If it is in your Documents folder, it was installed for the current user only.

Next, import the module to confirm it loads without errors:

Import-Module ExchangeOnlineManagement

If you get no error output, the module loaded successfully. You can verify further by checking the available commands:

Get-Command -Module ExchangeOnlineManagement | Measure-Object

This returns the total number of cmdlets available. The EXO V3 module includes optimized cmdlets like Get-EXOMailbox, Get-EXORecipient, and Get-EXOMailboxStatistics that run faster than their legacy equivalents.

Need to create or manage shared mailboxes after connecting? Our step-by-step guide on adding a shared mailbox in Outlook covers both the admin center and PowerShell methods.

How to Update or Uninstall the Module

Microsoft releases regular updates to the ExchangeOnlineManagement module with performance improvements, new cmdlets, and security patches. Keeping the module current is a best practice.

Update to the Latest Version

Update-Module -Name ExchangeOnlineManagement

If you originally installed for the current user, add -Scope CurrentUser. After updating, close and reopen PowerShell to load the new version.

Check for Available Updates

Compare your installed version to the latest available:

Get-InstalledModule ExchangeOnlineManagement | Select-Object Name, Version
Find-Module ExchangeOnlineManagement | Select-Object Name, Version

Uninstall the Module

To remove the module entirely:

Uninstall-Module -Name ExchangeOnlineManagement

If you installed for all users, run this in an elevated PowerShell window.

Roll Back to a Previous Version

If an update breaks existing scripts, you can install a specific older version:

Uninstall-Module -Name ExchangeOnlineManagement
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.5.1

Troubleshooting Common Installation Errors

Even straightforward installations can hit snags in corporate environments. Here are the errors IT admins encounter most often and how to fix them.

The term Install-Module is not recognized

This means PowerShellGet is missing or outdated. Run the following in an elevated PowerShell window:

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module PowerShellGet -Force -AllowClobber

Close and reopen PowerShell, then try the installation again.

Unable to resolve package source PSGallery

Your PowerShell session cannot reach the PowerShell Gallery. This usually indicates a TLS issue. Force TLS 1.2:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

For a permanent fix, set this in the Windows registry or add the line to your PowerShell profile.

Access denied or insufficient permissions

You are trying to install for all users without administrator privileges. Either run PowerShell as Administrator or install for the current user only with -Scope CurrentUser.

Module not found after installation

The module may have been installed to a path not included in your $env:PSModulePath. Check the install location:

Get-InstalledModule ExchangeOnlineManagement | Select-Object InstalledLocation

If the path is not in your module path, add it to the PSModulePath environment variable in System Properties or your PowerShell profile.

Proxy or firewall blocking the download

In corporate environments, outbound traffic to www.powershellgallery.com may be blocked. Work with your network team to allow HTTPS access to this domain. Alternatively, download the module on an unrestricted machine using Save-Module and transfer it manually:

Save-Module -Name ExchangeOnlineManagement -Path C:\Temp\Modules

Copy the saved folder to the target machine's module directory.

Best Practices for Managing the Module

  • Pin versions in production scripts. Use -RequiredVersion when installing on servers that run automated Exchange Online scripts to prevent unexpected changes from updates.
  • Update regularly on admin workstations. New versions often include security fixes and performance improvements. Check for updates at least monthly.
  • Use CurrentUser scope on shared machines. This avoids affecting other users and does not require admin elevation.
  • Test updates in a staging environment first. Before rolling a new module version to production, verify your existing scripts still function correctly.
  • Always disconnect sessions when done. Run Disconnect-ExchangeOnline -Confirm:$false after finishing your work to release resources and maintain security.
  • Limit imported cmdlets for automation. Use the -CommandName parameter with Connect-ExchangeOnline to load only the cmdlets your script needs, reducing memory usage and improving performance.

Frequently Asked Questions

Do I need admin rights to install the Exchange Online PowerShell module?

Not necessarily. If you install with -Scope CurrentUser, no administrator privileges are required. The module installs to your personal PowerShell modules folder. For an all-users installation that every account on the machine can access, you do need to run PowerShell as Administrator.

Can I install the module on macOS or Linux?

Yes. The ExchangeOnlineManagement module fully supports macOS and Linux when running PowerShell 7.4 or later. You also need to install the PSWSMan module. On macOS, install OpenSSL as an additional dependency. The install and connection commands are identical to Windows once PowerShell 7 is running.

How do I know which version of the module I have?

Run Get-InstalledModule ExchangeOnlineManagement to see the currently installed version. Compare it against the latest version on the PowerShell Gallery to check if an update is available. The latest stable release as of early 2026 is version 3.9.2.

What happened to the old Exchange Online Remote PowerShell method?

Microsoft fully deprecated basic authentication for Exchange Online in late 2022. The legacy New-PSSession approach using basic auth no longer works. All Exchange Online PowerShell connections must now use the ExchangeOnlineManagement module with modern authentication (OAuth 2.0). If you have old scripts using the New-PSSession method, they need to be updated to use Connect-ExchangeOnline.

Will installing the module affect my existing PowerShell setup?

No. The ExchangeOnlineManagement module installs alongside your existing modules without interfering. It does not modify system settings or other modules. If you install a new version while an older version exists, PowerShell will load the newest version by default. You can have multiple versions installed simultaneously and specify which one to load using Import-Module ExchangeOnlineManagement -RequiredVersion 3.5.1.

Set Up Exchange Online PowerShell the Right Way

Installing the ExchangeOnlineManagement module is the foundation for every Exchange Online automation and administration task. With the module in place, your team can manage mailboxes at scale, enforce security policies, configure mail flow, and build scripts that save hours of manual work every week.

At Always Beyond, we help organizations build efficient, secure Microsoft 365 environments — from initial setup through ongoing management. If your team needs help configuring Exchange Online, automating administrative tasks, or building a managed IT strategy that scales, get in touch with Always Beyond and let us handle the complexity so you can focus on your business.

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