Shawn Freeman
CEO

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.
Before running the install command, verify that your environment meets these requirements. Skipping this step is the most common reason installations fail.
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.
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.
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.
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.
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.
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.
With prerequisites confirmed, the installation itself takes one command. Here is the complete process for Windows, macOS, and Linux.
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
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.
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.
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
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.
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-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.
Compare your installed version to the latest available:
Get-InstalledModule ExchangeOnlineManagement | Select-Object Name, Version
Find-Module ExchangeOnlineManagement | Select-Object Name, Version
To remove the module entirely:
Uninstall-Module -Name ExchangeOnlineManagement
If you installed for all users, run this in an elevated PowerShell window.
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
Even straightforward installations can hit snags in corporate environments. Here are the errors IT admins encounter most often and how to fix them.
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.
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.
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.
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.
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.
-RequiredVersion when installing on servers that run automated Exchange Online scripts to prevent unexpected changes from updates.Disconnect-ExchangeOnline -Confirm:$false after finishing your work to release resources and maintain security.-CommandName parameter with Connect-ExchangeOnline to load only the cmdlets your script needs, reducing memory usage and improving performance.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.
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.
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.
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.
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.
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.
See exactly how your current IT setup measures up to our Hack Free standards. Enter your business email to receive: