Monday, June 29, 2015

Using GAM to extract tenant data for a Google Apps to Office 365 migration

Google to Office 365 migrations are fairly complex for several reasons:
  1. While coexistence is possible, it is difficult to configure and more difficult to communicate to your users effectively.
  2. The end user experience is vastly unique, so communication plans need to be robust
  3. Because a cutover migration tends to be more effective, it requires a lot of forethought to discover and recognize the gaps in process or behavior and determine which you can fix with a technical resolution and which need to be addressed in end user communication as a change.

One of the biggest uphill battles is extracting data from Google.  Granted Administrative rights in a Google tenant, there are not any export or save as options really presented to you.

Enter GAM (Google Account Manager)  Wiki here - GAM is a command line tool that allows administrators to manage many aspects of their Google Apps account

GAM can be used to report/export/document a google apps tenants:
  • Users
  • Groups
  • Aliases
  • Resource Calendars

The install and permissions model is well documented in the links above, be sure to use the latest version of GAM, they seem to consistently update it to include new functionality.

Once you have it installed and connected to the tenant there are several command you can use to extract data to a CSV file which can be users to script and create AD objects, cloud mailboxes, groups, resource mailboxes, etc.

Export users:
gam print users allfields > users.csv

Export groups:
Gam print groups gam print groups name description members managers owners settings > groups.csv

Export aliases:
gam print aliases allfields > aliases.csv

Export Resource calendars:
Gam print resources allfields > resources.csv

Of course, this is not a read only tool - you can also use the tool to edit/modify users in bulk.  For example, using a migration tool like BitTitan's MIgrationWiz, you are not able to extract data from a user who is disabled, so we can disable and enable users in the Google apps tenant using

gam update user chrislehr suspended off

gam update user chrislehr suspended on

Hope this helps, if there is more interest, I can show how I develop these CSV's into PowerShell to create everything in the Office 365 tenant!

No comments: