Running list of useful GAM commands

If you admin Google Workspaces and don’t GAM, you should GAM – get it from here. The big command reference list is here, but these are the specific ones I use most often.

Giving access to a mailbox
gam user [email protected] delegate to [email protected]

Checking / updating send as addresses
gam user [email protected] sendas [email protected] "Friendly Name" gam user [email protected] show sendas

See a user’s calendars
gam calendar [email protected] show calendars

Check permissions for a calendar
gam calendar [email protected] showacl
gam calendar [email protected] showacl

Sharing a calendar
gam calendar [email protected] add editor [email protected]
gam calendar [email protected] add editor

Forwarding email (need to do both commands)
gam user [email protected] add forwardingaddress [email protected]
gam user [email protected] forward on [email protected] <delete | keep>

Find out who owns a file based on Google file ID
gam report drive user all filters "doc_id==<fileID>"

Give a user permissions / ownership of a file based on Google file ID – you need to know the account of a user with permission to do that
gam user [email protected] add drivefileacl <fileID> user [email protected] role <owner | editor>

Check a user’s vacation / out of office status and message
gam user [email protected] show vacation

Set a user’s vacation / out of office status and message
gam user [email protected] vacation on subject "The reply subject" message "The reply message"

Export all groups and members to a CSV
This creates a row in the csv for each group, all members in one cell
gam print groups name members owners managers > the_name_of_the_output_file.csv
This creates a row in the csv for each member
gam print group-members > the_name_of_the_output_file.csv