Skip to content
August 5, 2026
  • AI & Copilot
  • Azure Cloud
  • How To Guides
  • Microsoft 365 Office
  • Windows
  • XBOX
  • Privacy Policy

Microsoft News Now

The Home of Microsoft News Today

Primary Menu
  • AI & Copilot
  • Azure Cloud
  • How To Guides
  • Microsoft 365 Office
  • Windows
  • XBOX
  • Privacy Policy
Light/Dark Button
Subscribe

Home - How To Guides - Optimizing Exchange Online PowerShell in 2026: Faster, Smarter, and Ready for Microsoft Graph

  • How To Guides
  • Microsoft 365/Office

Optimizing Exchange Online PowerShell in 2026: Faster, Smarter, and Ready for Microsoft Graph

Learn how to speed up Exchange Online PowerShell with EXO V3, smarter scripts, and Microsoft Graph PowerShell SDK best practices.
Dave W. Shanahan December 11, 2025 (Last updated: December 11, 2025) 8 minutes read
Optimizing Exchange Online PowerShell in 2026: Faster, Smarter, and Ready for Microsoft Graph

Microsoft is using a new Exchange Team blog post to push admins toward a more modern, efficient way of managing Exchange Online with PowerShell, focusing on tuning core PowerShell performance, adopting the latest Exchange Online module, and preparing for a future built on the Microsoft Graph PowerShell SDK. The guidance targets busy Microsoft 365 admins who run large-scale scripts and automation and need better speed, reliability, and resource usage when talking to Exchange Online.โ€‹


Why Exchange Online PowerShell Needs Optimizing

As Exchange Online environments grow, so do the scripts that manage themโ€”bulk mailbox changes, compliance policies, reporting, and automation pipelines can easily hammer both client and service if they are not optimized. Microsoftโ€™s latest guidance emphasizes that performance tuning is no longer โ€œnice to haveโ€: poorly written scripts can slow down management tasks, hit throttling limits, and consume excessive memory on admin workstations or automation hosts. The blog frames optimization as a mix of three layers: Windows PowerShell itself, common Microsoft 365 module practices, and Exchange Onlineโ€“specific tweaks.โ€‹


Step 1: Tune Core PowerShell for Better Performance

The first set of recommendations is about getting the PowerShell engine itself into a good state before connecting to any Microsoft 365 services. Microsoft reiterates that admins should run the latest supported PowerShell version for both security and performance, with Windows PowerShell 5.1 still built into supported Windows releases and PowerShell 7 available as a separate, regularly updated install. The post also reminds admins they can disable telemetry by setting the POWERSHELL_TELEMETRY_OPTOUT environment variable if they do not want PowerShell usage data collected, which can be important for locked-down or regulated environments.

$env:POWERSHELL_TELEMETRY_OPTOUT = "true"

Keeping PowerShell updated matters because newer versions deliver runtime and module-loading improvements that make remote connections and parallel workloads more efficient. For PowerShell 7, Microsoft points to official upgrade guidance, positioning 7.x as the preferred shell for cross-platform automation and modern features like ForEach-Object -Parallel that directly affect script speed in Exchange Online scenarios.โ€‹


Step 2: Best Practices for All M365 PowerShell Modules

Microsoft then zooms out to shared guidance that applies across Exchange Online, SharePoint, Teams, and Security & Compliance PowerShell modules. The core message is straightforward: stay on the latest module versions and establish a predictable update cadence, testing updates on admin workstations or management servers before rolling them into production automation. For serverless or managed environments like Azure Functions, Microsoft highlights features such as Managed Dependencies to keep modules auto-updated with minimal manual effort.

Script smarter, not harderโ€ฆ
  • Parallel Processing:
    • Leverageย ForEach-Object -Parallelย (in PowerShell 7+) or background jobs to perform bulk operations faster.
  • Use -ResultSize to return only the necessary data.ย This is especially beneficial when querying many objects.
Get-EXOMailbox -ResultSize 100

This example retrieves only the first 100 mailboxes (rather than default of 1,000), reducing resources and time to execute.

  • Prioritize service-side filtering when available.ย Not all filters are created equal. Understanding how, or more importantly,ย whereย filtering is done when using different methods can have a substantial impact on performance.
    • Experienced PowerShell users know about pipelining with Where-Object to filter data. This is one example ofย client-sideย filtering.
    • Most cmdlets available in the various M365 PowerShell modules support the -Filter parameter. This leveragesย service-sideย (a.k.a. server-side) filtering.
Get-EXOMailbox -Filter "Department -eq 'Sales'"

This example limits results to mailboxes for the sales department and leverages service-side filtering to ensure only the data we want is returned to the client.โ€‹

Authentication is another key pillar: the advice is to use service principals or app-only authentication (sometimes called app-based) for automation rather than interactive logons. For Exchange Online and Security & Compliance, Microsoft already documents app-only patterns that improve reliability and remove MFA prompts from scheduled jobs. The same concept applies across Microsoft 365โ€”each workload has its own app-only configuration, but the benefits are consistent: non-interactive auth, fewer brittle stored credentials, and cleaner security posture.โ€‹


Step 3: Script Smarter with Parallelism and Filtering

The blogโ€™s โ€œscript smarter, not harderโ€ section is aimed squarely at admins who still run large sequential loops and download far more data than needed. With PowerShell 7, commands like ForEach-Object -Parallel allow bulk operationsโ€”such as updating mailbox attributes or processing large user setsโ€”to be spread across parallel runspaces, dramatically reducing execution time compared to a simple foreach loop. Where PowerShell 7 is not available, traditional background jobs can offer some of the same benefits, though with more manual orchestration.โ€‹

Microsoft also reminds admins to limit result sets and filter at the service whenever possible. Using parameters like -ResultSize on Get-EXOMailbox or similar cmdlets helps avoid pulling thousands of objects when only a subset is required, cutting network traffic and processing overhead. Even more important is preferring server-side filtering (-Filter) over client-side Where-Object, because server-side filters are evaluated in the service, so only matching objects are returned, which is especially impactful at tenant scale.โ€‹


Step 4: Use the Exchange Online PowerShell V3 Module

The article then drills into Exchange Online specifics, championing the current Exchange Online PowerShell module (EXO V3+) as the baseline for modern scripting. This module uses REST-based cmdlets rather than older remote PowerShell (RPS) connections and includes exclusive Get-EXO* cmdlets optimized for better performance and resilience. Microsoftโ€™s own documentation shows that REST-backed cmdlets avoid the overhead of setting up PowerShell runspaces, leading to substantially higher throughput when fetching or updating large numbers of mailboxes.โ€‹

A table in the official docs compares legacy remote cmdlets, Get-EXO* cmdlets, and REST API cmdlets across security, performance, reliability, and functionality, with remote PowerShell clearly marked as least secure and least reliable. REST-based cmdlets match the old cmdlets for parameter coverage while bringing built-in retry logic and better handling of throttling, which is essential for long-running scripts at scale. Microsoft also links to earlier guidance on reducing memory consumption in EXO V3, including tips like skipping cmdlet help loading and limiting which cmdlets are brought into each session.


Memory and Reliability Tips for EXO V3

The memory-consumption guidance Microsoft calls out remains highly relevant for admins who run recurring management scripts or automation in constrained environments. One of the biggest wins is using -SkipLoadingCmdletHelp on Connect-ExchangeOnline, which prevents the module from loading its full help package into memoryโ€”significantly reducing footprint for non-interactive tasks. Another recommendation is to load only the cmdlets actually needed by passing specific names via -CommandName, rather than loading hundreds of cmdlets for scripts that only call a handful.โ€‹

In scenarios where many connections are created and torn down, Microsoft has also suggested running new Exchange Online connections in fresh PowerShell processes, so cached data and accumulated memory use are reset cleanly. This aligns with EXO V3โ€™s overall design philosophy of trading the brittle, long-lived RPS sessions for more stateless, REST-backed calls that are easier to scale and more robust in the face of transient errors or throttling.โ€‹


Microsoft Graph PowerShell SDK

Optimizing Exchange Online PowerShell in 2026: Faster, Smarter, and Ready for Microsoft Graph

The blog closes by pointing toward Microsoft Graph PowerShell SDK as the future of Microsoft 365 automation, including Exchange Online. Graph SDK modules are modular and cross-platform and use modern authentication, giving admins a consistent, API-first way to script across Entra ID, Exchange, SharePoint, Teams, Planner, and more. Microsoft has already announced retirement of other Graph tooling such as the Graph CLI, explicitly recommending the Graph PowerShell SDK as the preferred replacement for new automation investments.โ€‹

For admins who are already comfortable with workload-specific modules, Graph can feel like a big conceptual jump, but Microsoft is investing in updated documentation and training paths, including โ€œGetting startedโ€ guides and in-depth coverage in resources like the second edition of Automating Microsoft 365 with PowerShell. The key reassurance from the blog is that the same optimization principlesโ€”modern PowerShell, app-only authentication, parallel processing, and service-side filteringโ€”apply directly when using the Graph PowerShell SDK, so skills learned for EXO V3 carry forward.โ€‹


What This Means for Exchange Online Admins

For Exchange Online admins, the takeaway is clear: staying on legacy remote PowerShell cmdlets and old scripting patterns leaves performance, reliability, and security on the table. Moving to EXO V3 REST cmdlets, trimming memory usage, and leaning into PowerShell 7 parallelism and server-side filtering can deliver immediate benefits in daily management and large-scale automation. At the same time, starting to experiment with the Microsoft Graph PowerShell SDK prepares organizations for Microsoftโ€™s long-term direction, where Graph becomes the primary surface for Microsoft 365 automation.

The following table compares the benefits of REST API cmdlets to unavailable remote PowerShell cmdlets and theย exclusive Get-EXO* cmdlets in the EXO V3 module

ย 

Remote PowerShell cmdletsย (deprecated)

Get-EXO* cmdlets

REST API cmdlets

Security

Least secure

Highly secure

Highly secure

Performance

Low performance

High performance

Medium performance

Reliability

Least reliable

Highly reliable

Highly reliable

Functionality

All parameters and output properties available

Limited parameters and output properties available

All parameters and output properties available

 

Related Posts

  • How to Design a Custom Xbox Design Lab Controller: An Easy Step-by-Step Guide
  • How to Automate Microsoft Teams Admin Tasks with Agents: An Easy Step-by-Step Guide for 2025
  • Microsoft Entra ID Now Uses WebView2 in Windows 11 โ€“ What This Means for Sign-Ins
  • How to Enter BIOS on Windows 11: An Easy Step-By-Step Guide
  • How to add a USB security key on Windowsย 11 fast

About The Author

Exchange Online PowerShell

Dave W. Shanahan

I’m Dave W. Shanahan, a Microsoft enthusiast with a passion for Windows, Xbox, Microsoft 365 Copilot, Azure, and more. I started MSFTNewsNow.com to keep the world updated on Microsoft news. Based in Massachusetts, you can email me at davewshanahan@gmail.com.

See author's posts

Like this:

Like Loadingโ€ฆ

Related


Discover more from Microsoft News Now

Subscribe to get the latest posts sent to your email.

Tags: Authentication Azure Microsoft Microsoft 365 Microsoft Teams PowerShell Security SharePoint Surface Windows Windows 11 XBOX

Post navigation

Previous: Xbox Free Play Days: The Hunter: Call of the Wild, Spirittea, and The Dungeon of Naheulbeuk Headline a Cozy-Chaotic Weekend
Next: Microsoft Entra ID Now Uses WebView2 in Windows 11 โ€“ What This Means for Sign-Ins

Related Stories

How to Get Microsoft Copilot: Free, Microsoft 365, Work, and Edge Advanced Options Explained
  • How To Guides
  • AI and Copilot

How to Get Copilot: Every Free, Microsoft 365, Work, and Edge Advanced Option Explained

Dave W. Shanahan August 4, 2026 0
Microsoft 365 Copilot Just Got Way Smarter With GPTโ€‘5.6
  • News
  • Microsoft 365/Office

Microsoft 365 Copilot Just Got Wicked Smart With GPTโ€‘5.6

Dave W. Shanahan July 9, 2026
Microsoft Teams Rolls Out Smarter Bot Protection To Keep Unwanted AI Out Of Your Meetings
  • News
  • Microsoft 365/Office

Smarter Microsoft Teams Bot Protection Rolls Out To Keep Unwanted AI Out Of Your Meetings

Dave W. Shanahan July 1, 2026

Accessibility Amazon Android Authentication Azure Call of Duty Copilot Cybersecurity Developer Enterprise Free Play Days Gaming Generative AI GitHub Google Linkedin Microsoft Microsoft 365 Microsoft 365 Copilot Microsoft Copilot Microsoft Edge Microsoft Store Microsoft Teams Next Week on XBOX OpenAI Outlook Patch Tuesday Privacy Security Settings SharePoint Surface Twitter Windows Windows 10 Windows 11 Windows Insider XBOX XBOX Game Pass XBOX Game Pass Ultimate XBOX One XBOX Play Anywhere XBOX Series X XBOX Series X|S XBOX Wire

Useful Links

  • AI and Copilot (251)
  • Azure & Cloud (36)
  • Developers (4)
  • Enterprise (4)
  • How To Guides (100)
  • Microsoft 365/Office (98)
  • Microsoft Announcements (97)
  • News (1,296)
  • Security (78)
  • Surface (47)
  • Windows (169)
  • XBOX and Gaming (437)

You May Have Missed

IndieSelects_August2026_Laurel_Wire_purple_gold
  • News
  • XBOX and Gaming

XBOX Indie Selects for August 2026 Spotlight Six Summer Adventures Worth Playing

Dave W. Shanahan August 5, 2026 0
XBOX Insider Update Adds Chat Capture Controls, Cloud Save Recovery, and Bigger Wishlists
  • News
  • XBOX and Gaming

XBOX Insider Update Adds Chat Capture Controls, Cloud Save Recovery, and Bigger Wishlists

Dave W. Shanahan August 5, 2026 0
XBOX 25th Anniversary: New Gamerpics, Game Pass Collections, and Full FanFest Tour Schedule Revealed
  • News
  • XBOX and Gaming

XBOX 25th Anniversary: New Gamerpics, Game Pass Collections, and Full Fun FanFest Tour Schedule Revealed

Dave W. Shanahan August 4, 2026 0
How to Get Microsoft Copilot: Free, Microsoft 365, Work, and Edge Advanced Options Explained
  • How To Guides
  • AI and Copilot

How to Get Copilot: Every Free, Microsoft 365, Work, and Edge Advanced Option Explained

Dave W. Shanahan August 4, 2026 0
Copyright © 2026 All rights reserved. ReviewNews by AF themes.

%d