Use m365_initialize_sharepoint.ps1 before a SharePoint or OneDrive migration to temporarily disable tenant-wide
notifications to owners when items are reshared. Migration activity can recreate sharing relationships at scale; this
change prevents that activity from generating unnecessary notification email while content and permissions are being
migrated. If notifications are already disabled, the script makes no change.
When it changes the setting, the script records the previous state in m365_restore_sharepoint.json in your Documents
directory. Keep this file if you may need to undo the change. After the migration, run
m365_restore_sharepoint.ps1
from the same user account to re-enable the notification setting only if the initialize script disabled it.
common.psm1, m365.psm1 and m365_initialize_sharepoint.ps1 from the TMCTools/bin
folder..\m365_initialize_sharepoint.ps1
-SharePointDomain <SharePointDomain>
[-CloudEnvironment <Default | DoD | GCCHigh | China | Germany>]
| Parameter | Required | Values | Description |
|---|---|---|---|
-SharePointDomain |
Yes | SharePoint domain | The SharePoint domain to connect to. |
-CloudEnvironment |
No | Default, DoD, GCCHigh, China, Germany |
The cloud environment to connect to. Use this option if your tenant is not in the worldwide cloud. |
.\m365_initialize_sharepoint.ps1 -SharePointDomain 'example'
Documents directory for more information.