GAM – Google Workspace Domain and User Management
This article introduces GAM, a powerful command-line tool used by Google Workspace administrators to manage domains, users, and settings efficiently.
What Is GAM?
GAM (Google Apps Manager) is a command-line utility that allows Google Workspace admins to:
Manage users and groups
Update domain and organizational settings
Automate repetitive admin tasks
Perform bulk actions quickly and consistently
GAM is especially useful for admins who want speed, accuracy, and automation beyond the Google Admin Console UI.
Common Use Cases
GAM is commonly used for:
Creating, suspending, or deleting users
Managing aliases and groups
Auditing user settings and permissions
Applying changes across many accounts at once
Official Repository
GAM is open source and actively maintained.
Always refer to the official repository for updates and advanced usage.
Supported Operating Systems
Linux
macOS
(Windows is also supported via other install methods, but this guide focuses on Linux and macOS.)
Installation (Linux / macOS)
Step 1: Open Terminal
Open a terminal window on your system.
Step 2: Run the Installation Command
Run the following command exactly as shown:
bash <(curl -s -S -L https://gam-shortn.appspot.com/gam-install)
This command:
Downloads the latest GAM installer
Guides you through authentication
Sets up GAM for your Google Workspace domain
During Installation
You will be prompted to:
Authenticate with a Google Workspace admin account
Grant required permissions
Select your primary domain
Follow the on-screen instructions carefully.
Post-Installation Verification
After installation, verify GAM is installed by running:
gam version
If installed correctly, GAM will return version details.
Important Notes
GAM requires super admin or appropriate delegated admin privileges
Actions performed with GAM apply immediately
Use caution when running bulk commands
Common GAM Commands (Quick Reference)
Below are commonly used GAM commands for day-to-day Google Workspace administration. These are safe starting points for learning GAM.
User Management
Create a user:
gam create user user@domain.com firstname John lastname Doe password TempPass123
Suspend a user:
gam suspend user user@domain.com
Unsuspend a user:
gam unsuspend user user@domain.com
Delete a user:
gam delete user user@domain.com
Password & Security
Reset a user password:
gam update user user@domain.com password NewTempPass123
Force password change at next login:
gam update user user@domain.com changepassword on
Group Management
Add a user to a group:
gam update group group@domain.com add member user@domain.com
Remove a user from a group:
gam update group group@domain.com remove member user@domain.com
List group members:
gam print group-members group@domain.com
Information & Auditing
List all users:
gam print users
Show user details:
gam info user user@domain.com
GAM Safety & Guardrails (For Junior Admins)
GAM is extremely powerful. One command can affect hundreds or thousands of users instantly. Use the guardrails below to avoid mistakes.
1. Read Before You Run
Never copy/paste commands you do not fully understand
Read the command word by word before pressing Enter
2. Start With “Print” Commands
Use
printcommands first to preview what will be affectedExample:
gam print users
If the output is not what you expect, do not continue.
3. Avoid Bulk Commands Until Confident
Be cautious with commands that:
Affect all users
Use CSV files
Target entire organizational units
Bulk changes should be reviewed by a senior admin.
4. Never Test in Production Blindly
If possible, test commands on:
A single test user
A non-critical account
Confirm behavior before scaling.
5. Keep a Command Log
Save commands you run in a text file or ticket
This helps with:
Auditing
Rollbacks
Learning
6. When in Doubt, Stop
If you are unsure what a command will do:
Stop
Ask a senior admin
Check the official documentation
Summary
GAM enables fast, powerful Google Workspace administration
Common commands cover users, groups, and security
Junior admins must use guardrails to prevent mistakes
Used correctly, GAM saves hours of work. Used carelessly, it can cause instant disruption.