Exchange Online : vérifiez vos scripts PowerShell, certaines propriétés liées aux migrations disparaissent

Exchange Online: Check Your PowerShell Scripts, Some Migration-Related Properties Are Being Removed (English version below)

Microsoft poursuit la modernisation d’Exchange Online. Cette évolution touche désormais certaines propriétés historiques exposées par les cmdlets PowerShell lorsqu’elles sont utilisées avec le paramètre -Migration. Pour les administrateurs, l’enjeu est surtout de vérifier les scripts et automatisations existants avant qu’une dépendance à l’une de ces propriétés ne provoque un dysfonctionnement.

Qu’est-ce qui change ?

Les modifications concernent principalement l’utilisation du paramètre -Migration avec certaines cmdlets Exchange :

Get-Mailbox -Migration
New-Mailbox -Migration
Set-Mailbox -Migration

La documentation officielle Microsoft Learn confirme un déploiement en deux étapes. Depuis le 15 novembre 2026, certaines propriétés ne sont plus retournées lorsque les commandes suivantes sont exécutées :

Get-Mailbox -Migration
New-Mailbox -Migration

Puis, à compter du 15 décembre 2026, les propriétés concernées seront également bloquées en configuration lors de l’utilisation de :

New-Mailbox -Migration

Microsoft demande explicitement aux administrateurs de contrôler leurs scripts, leurs outils et leurs autres automatisations utilisant le commutateur -Migration, puis de supprimer les dépendances aux propriétés concernées avant ces échéances.

De nombreuses propriétés sont concernées

Il ne s’agit pas de la suppression de deux ou trois attributs anecdotiques. La liste publiée par Microsoft couvre plusieurs familles de propriétés utilisées historiquement dans l’administration des boîtes aux lettres.

On y trouve notamment des attributs personnalisés tels que CustomAttribute1 à CustomAttribute13 et ExtensionCustomAttribute1 à ExtensionCustomAttribute5, mais également différentes propriétés concernant la modération, le transfert des messages, les archives, le stockage, les quotas, la restauration ou encore les boîtes supprimées. voir : Changes to Get-Mailbox and New-Mailbox specifically with the Migration parameter

La liste étant relativement importante, il est préférable de ne pas essayer de déterminer manuellement si un script est concerné à partir de quelques propriétés connues. La bonne méthode consiste à inventorier les propriétés réellement consommées par les scripts puis à les comparer à la liste officielle publiée par Microsoft.

Pourquoi cela peut poser problème ?

Le principal risque se situe dans les scripts développés il y a plusieurs années puis automatisés et, parfois, oubliés.

Prenons un exemple volontairement simplifié :

$Mailbox = Get-Mailbox -Migration …

Un traitement peut ensuite exploiter une propriété du résultat :

if ($Mailbox.ProprieteX -eq « Valeur ») {# Traitement}

Si ProprieteX fait partie des propriétés supprimées, le problème ne se manifestera pas forcément au moment de l’exécution de Get-Mailbox. La commande peut s’exécuter correctement, alors que la logique située quelques lignes plus loin reçoit désormais une valeur absente.

C’est probablement le principal point d’attention : un script ne va pas nécessairement planter immédiatement. Selon la manière dont il a été développé, il peut produire une erreur plus tard dans le traitement ou, plus gênant encore, continuer à s’exécuter avec un comportement différent de celui attendu.

Microsoft confirme cependant que l’action à entreprendre concerne les workflows dépendant effectivement des propriétés affectées. L’objectif est donc bien d’identifier et de supprimer ces dépendances, et non de réécrire systématiquement tous les scripts utilisant -Migration.

Pourquoi Microsoft effectue-t-il ce changement ?

Selon Microsoft, cette suppression s’inscrit dans la simplification d’anciens scénarios d’administration d’Exchange Online. L’objectif est de moderniser la gestion du service et de supprimer progressivement certaines propriétés associées à ces mécanismes historiques.

Cette évolution est finalement assez représentative de l’administration d’un service SaaS comme Microsoft 365 : les interfaces d’administration, les cmdlets et les objets retournés évoluent dans le temps. Cela rappelle surtout qu’un script PowerShell utilisé en production doit être considéré comme une véritable application.

Un script peut fonctionner sans modification pendant plusieurs années et être exécuté quotidiennement par une tâche planifiée, un runbook ou une chaîne d’automatisation. Cela ne garantit pas pour autant que toutes les commandes et propriétés dont il dépend resteront disponibles indéfiniment.

Comment vérifier son environnement ?

La première étape consiste à rechercher dans vos scripts et automatisations les appels concernés :

Get-Mailbox -Migration
New-Mailbox -Migration
Set-Mailbox -Migration

Il ne faut pas limiter cette recherche aux scripts utilisés manuellement par les administrateurs Exchange. Les tâches planifiées, runbooks et outils développés en interne doivent également être contrôlés.

Une fois un script identifié, il faut regarder précisément quelles propriétés sont exploitées dans la suite du traitement.

L’utilisation de :

Get-Mailbox -Migration

ne signifie donc pas automatiquement que le script doit être modifié. C’est l’utilisation d’une propriété faisant partie de la liste retirée par Microsoft qui doit retenir l’attention. Après correction, mieux vaut tester le scénario complet plutôt que simplement vérifier que la cmdlet retourne un résultat. Le véritable problème peut se trouver plusieurs étapes plus loin dans le script.

Faut-il également envisager Get-EXOMailbox ?

C’est également l’occasion de rappeler une recommandation importante de Microsoft. Dans la documentation officielle de Get-Mailbox, Microsoft indique qu’en Exchange Online PowerShell, l’utilisation de Get-EXOMailbox est recommandée à la place de Get-Mailbox.

Cela ne signifie pas qu’il suffit de remplacer aveuglément Get-Mailbox par Get-EXOMailbox dans tous les scripts. Les paramètres, les ensembles de propriétés retournées et le comportement d’une automatisation doivent être vérifiés avant toute migration.

En revanche, lorsqu’un ancien script doit de toute façon être revu, il peut être intéressant de vérifier si une modernisation vers les cmdlets Exchange Online actuelles est pertinente au lieu de simplement corriger le minimum nécessaire.

Ce qu’il faut retenir

Cette évolution d’Exchange Online n’a probablement rien de spectaculaire pour la majorité des administrateurs. Elle peut pourtant avoir un effet très concret dans les environnements disposant d’un patrimoine important de scripts PowerShell. Il faut donc profiter de cette annonce pour rechercher les utilisations de Get-Mailbox -Migration, New-Mailbox -Migration et Set-Mailbox -Migration, identifier les propriétés réellement consommées et les comparer à la liste publiée par Microsoft.

Avec la seconde échéance fixée au 15 décembre 2026, mieux vaut effectuer cette vérification maintenant plutôt que de découvrir la dépendance lors de l’échec d’un processus automatisé.

Sources officielles Microsoft

Source principale

Changes to Get-Mailbox and New-Mailbox specifically with the Migration parameter [learn.microsoft.com]

Documentation PowerShell

Pour consulter la syntaxe actuelle de Get-Mailbox, son paramètre -Migration et la recommandation concernant Get-EXOMailbox dans Exchange Online :

Get-Mailbox – ExchangePowerShell | Microsoft Learn [learn.microsoft.com]

Documentation complémentaire sur les migrations Exchange Online

L’Exchange Team Blog de Microsoft propose également un article de référence permettant de replacer les commandes et mécanismes de migration dans leur contexte : migrations MRS, IMAP, Google Workspace et Outlook Anywhere.

Choosing and Troubleshooting Exchange Online Mailbox Migrations

*****************************************************

Microsoft continues to modernize Exchange Online. This evolution now affects several legacy properties exposed by PowerShell cmdlets when they are used with the -Migration parameter.

For administrators, the main concern is to review existing scripts and automation before a dependency on one of these properties causes unexpected behavior or breaks a production workflow.

What is changing?

The changes mainly affect the use of the -Migration parameter with several Exchange cmdlets:

PowerShell

Get-Mailbox -Migration
New-Mailbox -Migration
Set-Mailbox -Migration

According to the official Microsoft documentation, the changes are being introduced in two stages.

Starting November 15, 2026, selected properties are no longer returned when running:

PowerShell

Get-Mailbox -Migration
New-Mailbox -Migration

Then, starting December 15, 2026, the affected properties will also be blocked from being configured through:

PowerShell

New-Mailbox -Migration

Microsoft explicitly recommends reviewing scripts, tools, and other automation that use the -Migration switch and removing dependencies on the affected properties before these changes take effect.

Many properties are affected

This is not simply the removal of two or three rarely used attributes. Microsoft’s list covers several categories of properties historically used for mailbox administration.

These include custom attributes such as CustomAttribute1 through CustomAttribute13 and ExtensionCustomAttribute1 through ExtensionCustomAttribute5, as well as properties related to moderation, message forwarding, archives, mailbox storage, quotas, recovery, and deleted mailboxes.

The complete list is available in Microsoft’s documentation:

Changes to Get-Mailbox and New-Mailbox specifically with the Migration parameter

Because the list is relatively extensive, I would not recommend trying to determine whether a script is affected by checking only a handful of commonly used properties.

A better approach is to identify which properties your existing scripts actually consume and compare them against Microsoft’s official list.

Why could this cause problems?

The main risk comes from scripts that were developed several years ago, automated, and then largely forgotten because they simply continued to work.

Consider this deliberately simplified example:

PowerShell

$Mailbox = Get-Mailbox -Migration …

A script might then use one of the properties returned by the command:

PowerShell

if ($Mailbox.PropertyX -eq « Value ») {# Processing}

If PropertyX is one of the properties being removed, the problem might not appear when Get-Mailbox itself runs.

The command can complete successfully, while subsequent logic receives a property that is no longer present.

This is probably the most important point to keep in mind: a script will not necessarily fail immediately.

Depending on how the script was written, an error might occur later in the workflow. Even worse, the script could continue running but behave differently from what was originally intended.

The goal is therefore to identify workflows that actually depend on the affected properties and remove those dependencies. There is no reason to systematically rewrite every script simply because it uses the -Migration parameter.

Why is Microsoft making this change?

According to Microsoft, these changes are part of the simplification of legacy Exchange Online management scenarios. The objective is to modernize service management while gradually removing properties associated with older administrative mechanisms.

This is fairly representative of administering a SaaS platform such as Microsoft 365: management interfaces, cmdlets, APIs, and returned objects evolve over time.

More importantly, it serves as a reminder that a PowerShell script used in production should be treated like a real application.

A script may run unchanged for several years as part of a scheduled task, runbook, or automation workflow. This does not mean that every command, parameter, and property it depends on will remain available indefinitely.

How should you check your environment?

The first step is to search your scripts and automation for the affected calls:

PowerShell

Get-Mailbox -Migration
New-Mailbox -Migration
Set-Mailbox -Migration

Do not limit this search to scripts manually executed by Exchange administrators.

Scheduled tasks, automation runbooks, internal administration tools, and other integrations should also be reviewed.

Once a script has been identified, check exactly which properties are used later in the workflow.

For example, the presence of:

PowerShell

Get-Mailbox -Migration

does not automatically mean that the script needs to be modified.

What really matters is whether the script depends on a property included in Microsoft’s removal list.

After making any necessary changes, test the entire workflow rather than simply confirming that the Exchange cmdlet returns a result. The actual problem could occur several steps later in the script.

Should you also consider Get-EXOMailbox?

This change is also a good opportunity to highlight another Microsoft recommendation.

In the official Get-Mailbox documentation, Microsoft states that for Exchange Online PowerShell, administrators should use Get-EXOMailbox instead of Get-Mailbox where appropriate.

That does not mean you should blindly replace Get-Mailbox with Get-EXOMailbox throughout your scripts.

Parameters, returned property sets, and the overall behavior of an automation workflow should always be validated before making such a change.

However, if you already need to review an older script, it may be worth determining whether the script should be modernized to use current Exchange Online cmdlets rather than simply applying the minimum changes required to keep it working.

Key takeaways

This Exchange Online change probably won’t be particularly noticeable for most administrators. However, it could have a very real impact in environments with a large collection of PowerShell scripts and legacy automation.

Now is therefore a good time to search your environment for:

PowerShell

Get-Mailbox -Migration
New-Mailbox -Migration
Set-Mailbox -Migration

Then identify the properties actually being consumed by those scripts and compare them against Microsoft’s official list.

With the second milestone scheduled for December 15, 2026, it is better to perform this review now rather than discover a hidden dependency when an automated process stops working.

More broadly, this is another useful reminder that a PowerShell script running in production is never really « finished. » It should be inventoried, documented, tested, and regularly reviewed against changes made to Microsoft 365.


Official Microsoft References

Main reference

The primary Microsoft documentation describes the change, the timeline, and the affected properties:

Changes to Get-Mailbox and New-Mailbox specifically with the Migration parameter

PowerShell documentation

For the current Get-Mailbox syntax, the -Migration parameter, and Microsoft’s recommendation regarding Get-EXOMailbox in Exchange Online:

Get-Mailbox – ExchangePowerShell | Microsoft Learn

Additional Exchange Online migration documentation

The Microsoft Exchange Team also provides a useful overview of Exchange Online migration mechanisms, including MRS, IMAP, Google Workspace, and Outlook Anywhere migrations:

Choosing and Troubleshooting Exchange Online Mailbox Migrations

Laisser un commentaire