Logo

Documentation home for Transend tools

Microsoft 365 Initialize Graph script

Use m365_initialize_graph.ps1 when migrating calendars through Microsoft Graph. The script creates Exchange Online mail-flow rules for calendar messages sent by members of the migration group. These rules accept and remove internal calendar messages and block external calendar messages generated during the migration, helping prevent duplicate responses, unwanted notifications, and delivery of migration-generated calendar traffic. The script does not add users to the group supplied with -GroupIdentity.

The script records every setting it changes in m365_restore_graph.json in your Documents directory. Keep this file if you may need to undo the changes. After the migration, run m365_restore_graph.ps1 from the same user account to restore the recorded tenant and mailbox settings without reversing settings that the initialize script did not change.

Setup

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

Usage

.\m365_initialize_graph.ps1
  -GroupIdentity <GroupIdentity>
  [-CloudEnvironment <Default | DoD | GCCHigh | China | Germany>]

Parameters

Parameter Required Values Description
-GroupIdentity Yes Group identity The identity of the mail-enabled group containing accounts being migrated.
-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 select users for Graph migration

Note that the users in scope for the migration must already have membership in the -GroupIdentity group. This tool does not add users to that group.

.\m365_initialize_graph.ps1 -GroupIdentity 'migration@example.org'

Troubleshooting

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