Blog Post

Exchange Team Blog
2 MIN READ

Announcing Optional Help File Loading in Exchange Online PowerShell

The_Exchange_Team's avatar
Oct 28, 2024

Today, we are announcing updates to the Connect-ExchangeOnline cmdlet used to connect to Exchange Online. Currently, this cmdlet loads the cmdlet help file, which is required for the Get-Help cmdlet. We received feedback from customers that repeated connections can increase memory consumption because of this behavior. We also know that Connect-ExchangeOnline is used frequently in scripts, which are unlikely to call Get-Help.

To address this feedback, we previously introduced the SkipLoadingCmdletHelp parameter, which allows you to skip loading the help files. Moving forward, we are making an additional change to this behavior.

Starting with version 3.7.0 Preview and 3.7.0 GA of the Exchange Online PowerShell module (release planned in November 2024), the help file will no longer be loaded by default. Instead, if you want to load the help files, you will need to use a new parameter called LoadCmdletHelp. This change ensures that help files are loaded only when explicitly required, saving resources on your system.

Update Your Scripts

To maintain compatibility with your existing scripts, the SkipLoadingCmdletHelp parameter will be available in version 3.7.0 Preview and 3.7.0, but will no longer function. This is to ensure that your existing scripts do not break. However, this parameter will be removed in version 3.8.0.

We recommend that you review and if necessary, update your scripts to use the new LoadCmdletHelp parameter in scenarios where you require the help files.

Thank you for your understanding, and please feel free to leave us any feedback you have about this change in the Comments section.

Exchange Online Manageability Team

Published Oct 28, 2024
Version 1.0
  • Skaldhor's avatar
    Skaldhor
    Copper Contributor

    The_Exchange_Team Since we never got an answer to my question on the related blog post https://techcommunity.microsoft.com/t5/exchange-team-blog/reducing-memory-consumption-of-the-exchange-online-powershell-v3/ba-p/3970086 I thought this would be a good place to repost:

    Why do we need to download the tmp module each time we run "Connect-ExchangeOnline"?

    Other PS-modules from Microsoft like "Microsoft.Online.SharePoint.PowerShell", "Microsoft.Graph.Authentication" or "Az.Accounts" are installed to the local machine once. You can then connect to the services and run cmdlets according to your permission. This results in less network traffic and faster connection. When not executing "Disconnect-ExchangeOnline" you are left with the module in your user's localappdata\temp directory, which also uses system resources (disk space). Maybe the "ExchangeOnlineManagement" can also be set up like that?

  • Hello Skaldhor , Apologies for missing your comment earlier. The EXO V3 module, unlike other PowerShell modules, loads few dynamic components at runtime, which necessitates downloading the tmp module each time the Connect-ExchangeOnline cmdlet is run. This behavior is by design. We appreciate your feedback on further memory reductions, but at this time, we are unable to incorporate these changes.