What is GAM?

Screenshot of GAM in action
Screenshot of GAM in action
“With GAM you can change the password of 100+ users in a matter of seconds.”

— Tricent

Google Apps Manager (or simply GAM) is a command-line tool that helps with automation and bulk operations. It’s also able to give you valuable insights into your Google Workspace instance.

As a sysadmin, you may want to use GAM to:

  • create, edit, or delete users, groups, organizational units (OUs)
  • monitor Google Workspace activities
  • move, modify, or delete files  
  • … and much more

You might already be using the Google Admin Console to carry out some of these tasks, but eventually, you’ll realize that some tasks are simply too time-consuming to manually carry out. That’s when GAM steps in.

For example, imagine how much time it’d take you to change the password of 100+ users in the Google Admin Console, or if you’d have to check how many Google Workspace licenses are currently being used/unused. With GAM you can do this in a matter of seconds.    


GAM must be installed on a PC, Linux, or Mac. Please note that you must have admin access to the Google Admin Console, as you’re required to authorize and grant GAM with API permissions.

  1. Visit https://github.com/jay0lee/GAM/wiki#download-gam
  2. Select the version compatible with your operating system (OS)
  3. Follow the guided instructions (as shown in the video below)


Once installed, open your command-line tool and execute these 3 commands in the following order:

  1. Gam create project
  2. (This creates a GCP project to enable the API access needed for later execution of the GAM commands)
  3. Gam oauth create
  4. (This checks and creates the right authentication needed for later execution of the GAM commands)
  5. Gam user a_user@example.com check serviceaccount
  6. (This checks and creates the API access needed in Google Workspace. Note: The a_user@example.com must be replaced with your Google Workspace email)


Congratulations, you have successfully installed GAM. Here are some scripts you can try running in your command-line tool:

  1. Gam print users todrive
  2. (This script lists all Google Workspace users from your organization into a newly created Google Sheet, which can be accessed from your Google Drive)
  3. Gam print users allfields licenses todrive
  4. (Similar to the first script, you’ll get a Google Sheet of all Google Workspace users including information like first name, last name, last login time, and the types of licenses assigned to them)
  5. Gam print groups allfields members owners manager todrive
  6. (This script lists all groups including the settings, members, owners, and managers to a Google Sheet which can be accessed from your Google Drive)


Knowing all GAM commands can be difficult at first, so here’s a cheat sheet to help you get started: https://gamcheatsheet.com/

Want to learn more about GAM and how to use it in your daily work? Download our free ebook here: