title: Install-Module ExchangeOnlineManagement: Connect to Exchange Online PowerShell description: Step-by-step guide to install Exchange Online PowerShell module and connect. Includes Install-Module -Name ExchangeOnlineManagement commands, troubleshooting, and MFA setup for Office 365 admins. difficulty: intermediate estimatedReadTime: 8 lastUpdated: January 2025 featured: false faqItems:
- question: >-
What PowerShell version is required for Exchange Online Management Module
installation?
answer: >-
To install the Exchange Online Management Module, you must have PowerShell
version 5.1 or higher. You can check your current PowerShell version by
running the command
$PSVersionTable.PSVersionin a PowerShell window. If your version is lower than 5.1, you will need to update PowerShell before proceeding. The recommended way to upgrade is to install the latest Windows Management Framework, which can be downloaded from the Microsoft website. - question: How do I troubleshoot a 'Module Not Found' error during installation?
answer: >-
If you encounter a 'Module Not Found' error, first ensure your PowerShell
session is running with administrative privileges. Then, update the
Exchange Online Management Module by executing
Update-Module ExchangeOnlineManagement. If the error persists, check your internet connection and repository settings, and verify that the PowerShell Gallery is accessible. You may also need to set your execution policy toRemoteSignedby runningSet-ExecutionPolicy RemoteSigned -Scope CurrentUser. - question: What should I do if I cannot connect to Exchange Online PowerShell?
answer: >-
If you cannot connect to Exchange Online PowerShell, first verify your
Microsoft 365 admin credentials. If Multi-Factor Authentication (MFA) is
enabled, ensure you use the command
Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress $true, and complete the sign-in prompt. Additionally, check if your IP is blocked by any Conditional Access policies. You can test connectivity by runningTest-Connectionto relevant Exchange Online endpoints or checking for network restrictions in your organization. heroImage: "https://images.unsplash.com/photo-1556740738-b6a63e27c4e0?w=1200&h=630&fit=crop"
Exchange Online PowerShell allows administrators to manage Office 365 mailboxes, configure settings, and automate tasks that are not available in the Microsoft 365 Admin Center. This guide will walk you through the installation and connection process for Exchange Online PowerShell.
Requirements
- Windows 10, Windows 11, or Windows Server 2016 and later.
- PowerShell version 5.1 or higher.
- Administrative privileges on the machine.
Step 1: Install the Exchange Online PowerShell Module
- Open PowerShell as Administrator
- Click Start, type PowerShell, right-click on Windows PowerShell, and select Run as administrator.
- Install the Exchange Online Management Module
Run the following command to install the module:powershellCopyEditInstall-Module ExchangeOnlineManagement - Confirm the Installation
If prompted to install from an untrusted repository, type Y and press Enter. - Verify the Installation
Check if the module installed correctly by running:powershellCopyEditGet-Module ExchangeOnlineManagement -ListAvailable
Step 2: Connect to Exchange Online PowerShell
Method 1: Standard Authentication
For normal admin accounts, use:
Connect-ExchangeOnline -UserPrincipalName [email protected]
- Enter your Microsoft 365 admin credentials when prompted.
- A PowerShell session will establish a connection to Exchange Online.
Method 2: Multi-Factor Authentication (MFA)
If your account has MFA enabled, use:
Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress \$true
A Microsoft sign-in window will appear to complete authentication.
Step 3: Verify Connection to Exchange Online
To confirm you’re connected, run:
Get-Mailbox
If you see a list of user mailboxes, you’re successfully connected.
Step 4: Disconnect When Done
To prevent session limits, disconnect when finished:
Disconnect-ExchangeOnline -Confirm:\$false
Troubleshooting Installation Issues
- Module Not Found?
- Run
Update-Module ExchangeOnlineManagementto update the module. - Restart PowerShell and try again.
- Run
- Permission Denied?
- Ensure you’re running PowerShell as Administrator.
- Check execution policies:powershellCopyEdit
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- Cannot Connect?
- Verify your admin credentials.
- Check if your IP is blocked by Conditional Access policies.
Best Practices
✅ Always Disconnect – Close sessions when not in use to avoid connection limits.
✅ Use MFA for Security – Enforce Multi-Factor Authentication for admin accounts.
✅ Keep Modules Updated – Run Update-Module ExchangeOnlineManagement regularly.
Need Professional Help?
Our team of experts can help you implement and configure these solutions for your organization.