Logo

Documentation home for Transend tools

Microsoft 365 Initialize SharePoint script

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.

Setup

  1. Download TMCTools.
  2. From the TMCTools zip file, extract common.psm1, m365.psm1 and m365_initialize_sharepoint.ps1 from the TMCTools/bin folder.
  3. Ensure you have created the required app using m365_initialize_app.ps1.

Usage

.\m365_initialize_sharepoint.ps1
  -SharePointDomain <SharePointDomain>
  [-CloudEnvironment <Default | DoD | GCCHigh | China | Germany>]

Parameters

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.

Examples

Example 1: Configure all users for SharePoint migration

.\m365_initialize_sharepoint.ps1 -SharePointDomain 'example'

Troubleshooting

  • Review the log file in your Documents directory for more information.