Home / Getting Started

Google Drive ID collection script

Use the below Google Drive ID collection script (get_drive_ids.ps1) to collect drive IDs that are required in the Define Drives list in Transend Migration Console.

It is required you complete the Setup steps before running the inventory script, which is located at the bottom of this page.

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. Select Google Cloud Service Accounts.
  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.

Usage

.\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

.\get_drive_ids.ps1 -AdminId '[email protected]' -KeyFile 'C:\Temp\key.json' -Target 'M365'  

Example 2: Collect drive IDs for migrating to Google Workspace

.\get_drive_ids.ps1 -AdminId '[email protected]' -KeyFile 'C:\Temp\key.json' -Target 'Google'  

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

.\get_drive_ids.ps1 -AdminId '[email protected]' -KeyFile 'C:\Temp\key.json' -Target 'Local'  

Inventory script

After completing the above Setup steps, download and run the following inventory script: