Logo

Documentation home for Transend tools

Google Drive ID Collection script

Use go_get_drive_ids.ps1 to inventory the shared drives in a Google Workspace account and create a CSV formatted for Transend Migration Console. Shared-drive names are not guaranteed to be unique, so the migration project needs each drive’s unique ID to identify the correct source. The -Target option adds the destination columns required for a Google Workspace, Microsoft 365, or local-file migration, giving you a mapping file that you can complete and import.

Setup

  1. Log into the Google Cloud console.
  2. Click the project picker (to the right of Google Cloud in the top navigation) and click New project.
  3. Give the project a name. For example, Drive ID Collection. Use the defaults for other options.
  4. Click Create.
  5. From the notifications area (bell icon), click Select Project under the newly created Drive ID Collection project.
  6. Click Next -> Enable.
  7. Click the link to https://console.cloud.google.com/iam-admin/serviceaccounts.
  8. Click Select project and choose Drive ID Collection.
  9. Click Create service account.
  10. Give the service account a name. For example, Service Account. Use the defaults for other options.
  11. Click Done.
  12. Open the service account and select the Keys tab.
  13. Click Add key -> Create new key -> JSON.
  14. Click Create and make note of the download location for the key.
  15. Select the Details tab and make note of the Unique ID value.
  16. Log into the Google Workspace admin center.
  17. Navigate to Security -> Access and data control -> API controls.
  18. Click Manage Domain Wide Delegation.
  19. Click Add new.
  20. Enter the unique ID copied in Step 14.
  21. Enter https://www.googleapis.com/auth/drive.readonly in the OAuth scopes field.
  22. Click Authorize.
  23. Add your admin ID to each shared drive with Manager access.
  24. Download TMCTools.
  25. From the TMCTools zip file, extract common.psm1, go.psm1 and go_get_drive_ids.ps1 from the TMCTools/bin folder.

Usage

.\go_get_drive_ids.ps1
  -AdminId <AdminId>
  -KeyFile <KeyFile>
  -Target <Google | M365 | Local>

Parameters

Parameter Required Values Description
-AdminId Yes Admin ID The admin ID to use for authentication.
-KeyFile Yes Key File The path to the JSON key file to use for authentication.
-Target Yes Google, M365, Local The provider you are migrating to.

Examples

Example 1: Collect drive IDs for migrating to Microsoft 365

.\go_get_drive_ids.ps1 -AdminId 'admin@example.org' -KeyFile 'C:\Temp\key.json' -Target 'M365'

Example 2: Collect drive IDs for migrating to Google Workspace

.\go_get_drive_ids.ps1 -AdminId 'admin@example.org' -KeyFile 'C:\Temp\key.json' -Target 'Google'

Example 3: Collect drive IDs for migrating to the local filesystem or a file share

.\go_get_drive_ids.ps1 -AdminId 'admin@example.org' -KeyFile 'C:\Temp\key.json' -Target 'Local'

Troubleshooting

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