Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

User Email

gam <who> <attributes/values>


where attributes and values are:
language <language code>
GAM Cheat Sheet
github.com/jay0lee/GAM for GAM 5.11
Drive Management
gam <who> show filelist [todrive] [query <query>]
[allfields] [createddate] [description] [fileextension]
show language [filesize] [id] [restricted] [starred] [trashed] [viewed]
pagesize 25|50|100 Users Calendars [lastmodifyingusername] [lastviewedbymedate]
shortcuts|arrows|snippets|utf|webclips on|off [modifieddate] [originalfilename] [quotaused]
signature <signature text> |(file <signature file> gam create|update user <user email> [options] gam calendar <cal email>|id:<cal id>
<action> [<options>] [shared] [writerscanshare]
[charset <Charset>]) (replace <Tag> <String>)* gam <who> update user [options]
gam <who> show driveactivity [todrive] [fileid <id>]
[name <String>] [replyto <EmailAddress>] Common options: where <action> and <options> are:
vacation on|off [subject <String> (message [folderid <id>]
[firstname <First Name>] [lastname <Last Name>] showacl|wipe
<String>)|(file <FileName> [charset <CharSet>]) add|update freebusy|read|editor|owner <user gam <who> show drivesettings [todrive]
(replace <Tag> <String>)* [html] [contactsonly] [password <Password>] [email <New Email>] gam <who> show fileinfo <id>|[allfields|
email>|user <user email>|group <group
[domainonly][startdate <Date>] [enddate <Date>]] [gal on|off] [suspended on|off] [sha] [md5] [crypt]
email>|domain [<Domain name>]|default <DriveFieldName>*]
[add] label <label name> [messagelistvisibility [nohash] [changepassword on|off] [org <Org Name>] delete <user email>|user <user email>|group <group gam <who> show filetree
hide|show] [labellistvisibility Extended options: email>|domain [<Domain name>]|default
hide|show|showifunread] [backgroundcolor gam <who> show filerevisions <id>
[relation <relation type> <relation value>] delete [user <user email>] [id <ACL id>]
<color>] [textcolor <color>] [externalid <id type> <id value>] addevent [attendee <user email>] [location <location>] gam <who> add drivefile [localfile <filepath>]
delete label <label name>|regex:<RegularExpression> [phone type <phone type> value <phone value> [optionalattendee <user email>] [anyonecanaddself] [drivefilename <filename>] [convert] [ocr]
|--ALL_LABELS-- primary|notprimary] [summary <summary>] [source <title> <url>] [ocrlanguage <language>] [returnidonly]
update label search <search> replace <replace> [merge] [organization name <org name> title <org title> [description <event description>] [id <id>] [copyrequireswriterpermission true|false] [restricted]
update labelsettings <label name> name <new label type <org type> department <org dept> [available] start allday <YYYY-MM-DD>|<start
name> [message_list_visibility show|hide] [starred] [trashed] [viewed] [lastviewedbyme
symbol <org symbol> costcenter <org cost center> datetime> end allday <YYYY-MM-DD>|<end
[label_list_visibility show|hide|show_if_unread] datetime> [guestscantinviteothers] <date>] [modifieddate <date>] [description
location <org location>description <org desc>
show labels [onlyuser] [guestscantseeothers] [hangoutsmeet] [visibility <description> [mimetype <type>] [parentid <folder
domain <org domain> primary|notprimary]
filter from <email address>|to <email address>|subject default|public|private] [tentative] [notifyattendees] id>] [parentname <folder name>] [writerscantshare]
[address type <address type>
<words>| haswords <words>| nowords [recurrence <repeat>] [noreminders]|[reminder gam <who> update drivefile [localfile <filepath>]
<words>|musthaveattachment| label <label unstructured <unstructered address>
extendedaddress <address extended address> <minutes> email|popup|sms] [timezone <timezone] [newfilename <filename>] [id <drive file id> |
name>|markread|archive|star| forward <email [privateproperty <Key> <Value>] [sharedproperty
address>|trash|neverspam streetaddress <address street address> drivefilename <filename>] [convert] [ocr]
<Key> <Value>] [colorindex <index>]
delete|info filter <FilterIDEntity> locality <address locality> region <address region> [ocrlanguage <language>]
updateevent eventid <id> <options> where <options>
[add]|update sendas <email address> <name> postalcode <address postal code> pobox <address
are as per addevent above [copyrequireswriterpermission true|false] [restricted
[default] [replyto <email address>] [treatasalias pobox> countrycode <address country code> deleteevent [eventid <id>] [query <query>]
primary|notprimary] true|false] [starred true|false] [trashed true|false]
<Boolean>] [signature <String>|(file <FileName> [notifyattendees] [doit]
[charset <CharSet>]) (replace <RegularExpression> [im type <im type> protocol <im protocol> primary [viewed true|false] [lastviewedbyme <date>]
<String>)*] <im value>] gam <who> show calendars|calsettings [modifieddate <date>] [description <description>]
delete sendas <email address> [location type <location type> area <area> building gam <who> delete calendar <calendar email> [mimetype <type>] [parentid <folder id>]
info sendas <email address] [format] <building> desk <desk> floor <floor> section gam <who> add | update calendar <calendar email> [parentname <folder name>] [writerscantshare]
pop on|off [for allmail|newmail|fromnowown] [action <section> endlocation] [selected true|false] [hidden true|false] [reminder gam <who> get drivefile [id <file id> | query <query>]
keep|leaveininbox|archive|delete|trash|markread] [sshkeys expires <date> key <keyvalue>] email|sms|popup (minutes)] [summary <summary>]
imap on|off [noautoexpunge] [expungebehavior [format <openoffice|microsoft|pdf>] [targetfolder
[posixaccounts gecos <gecos> gid <numeric gid> [colorindex (1-24)] [backgroundcolor <htmlcolor>]
archive|deleteforever|trash] [maxfoldersize uid <numeric uid> home <home path> [foregroundcolor <htmlcolor>] <local path>] [revision <number>]
0|1000|2000|5000|10000] primary true|false shell <shell> system <systemid> gam <who> update calattendees csv <csv file> [start gam <who> delete emptydrivefolders| drivefile <file
forward on|off [email address] [keep|archive|delete] username <username> os <ostype> endposix] YYYY-MM-DD] [end YYYY-MM-DD] [allevents] id> [purge]
delegate to <user email> [agreedtoterms on|off] [dryrun] gam <who> transfer drive <target user> [keepuser]
add delegate|forwardingaddress <user email> [schemaname.fieldname <fieldvalue>] gam <who> transfer seccals <target user> [keepuser]
show delegates [csv] gam <who> empty drivetrash
[schemaname.multivaluefieldname multivalued gam <who> info calendar <calendar email>|primary
show vacation|filters|imap|pop|forward|profile| <fieldvalue>] gam <who> print calendars [todrive] ACLs
forwardingaddress [recoveryemail <email>] [recoveryphone <phone>] gam user <user email> show drivefileacl <file id>
show sendas|vacation|signature [format]
print delegates|forwardingaddress [todrive]
delete delegate|forwardingaddress <user email>
Extended options for update only:
[customerid <string>]
Calendar Resources [asadmin]
gam user <user email> add drivefileacl <file id>
profile shared|unshared [otheremail home|work|other|<custom> <email gam create resource <id> <Name> [parameters] [user|group|domain <value>|anyone] [withlink]
update photo <photo filename> address>] gam update resource <id> [name <Name>]
[parameters] [role <aclrole>] [sendemail] [emailmessage
get photo [drivedir|(targetfolder <FilePath>)] [noshow] gam info user <user email> [nogroups] [noaliases]
where parameters are: <message text>]
delete photo [nolicenses] [noschemas] [schemas list,of,schemas]
print filters|forward|sendas [todrive] [description <description>] [type <type>] [building gam user <user email>update drivefileacl <file id>
[userview] [skus <list,of,skus>] <building>] [capacity <number>] [features <permission id> [withlink] [role <aclrole>]
gam user <who> sendemail|draftemail [message gam delete user <user email> <features>] [floor <floor>] [floorsection [transferownership <true|false>] [asadmin]
<message>] [file <file>] [subject <subject] [recipient gam undelete user <user email> [org <org Name>] <floorsection>] gam user <user email>delete drivefileacl <file id>
<recipient>] gam <who> print gam info|delete resource <id>
gam user <who> insertemail|importemail [message gam print users [allfields] [custom all|list,of,schemas] <permission id> [asadmin]
gam print resources [id] [description] [email] [type]
<message>] [file <file>] [subject <subject] [recipient [userview] [ims] [emails] [externalids] [relations] [allfields] [todrive] where <aclrole> is:
<recipient>] [labels <labels,>] [addresses] [organizations] [phones] [licenses] gam create building <name> [id <id>] [latitude commenter|contentmanager|editor|fileorganizer|
gam user <who> delete|trash|untrash [photo] [firstname] [lastname] [emailparts] <latitude>] [longitude <longitude>] [description organizer|owner|reader|writer
messages|threads query <gmail search> [doit] [deleted_only] [id] [orderby <description>] [floors <floors>]
[maxto<action> <number>] email|firstname|lastname] [query <query>] gam update building <name or id:id> [name <name>] Team Drive
gam user <who> modify messages [ascending|descending] [domain <Domain Name>] [latitude <latitude>] [longitude <longitude>] gam user <email> add teamdrive <name>
[description <description>] [floors <floors>] gam user <email> update teamdrive <id> asadmin
addlabel|removelabel <label> query <gmail search> [fullname] [ou] [suspended] [changepassword] [gal]
gam info building <name or id:id>
[doit] [maxto<action> <number>] [agreed2terms] [admin] [creationtime] [aliases] [name <name>]
gam delete building <name or id:id>
where <action> is: [lastlogintime] [groups] [ismailboxsetup] [todrive] gam create feature name <name> gam user <email> delete teamdrive <id>
delete|trash|untrash|modify gam <who> show gmailprofile [todrive] gam update feature <name> name <newname> gam user <email> print|show teamdrives [todrive]
e.g. maxtotrash, maxtountrash gam delete feature <name> [asadmin]

DISCLAIMER: This is a reference sheet for people familiar with GAM and is provided “as-is”. You use it at your own risk! Always test commands before running them in a production environment.
https://gamcheatsheet.com/ gam@gamcheatsheet.com 1 © Copyright 2020 Glen Pringle Version 1.6.3, 20th August, 2020
Groups Email Aliases Classroom User Security Settings
gam create | update group <group email> gam create|update alias <alias> user|group|target gam create course id [alias <alias>] <CourseAttributes>
gam <who>|file <filename> <command>
<attributes/values> <primary address> gam update course <id or alias> <CourseAttributes>
where <command> is:
where attributes and values are: gam info alias <alias> where <CourseAttributes> is: show tokens (oauth tokens)
name <Group Name> gam delete alias [user|group|target] <alias> [name <name>] [section <section>] show token clientid <client id>
description <Group Description> gam <who> delete alias [teacher <teacher email>] delete token clientid <client id>
email <EmailAddress> gam print aliases [todrive] [heading <heading>] [description <description>] show asps (app-specific pwds)
admincreated true|false]
[room <room>] [status delete asp <ID>
allow_external_members true|false
message_moderation_level moderate_all_messages| <PROVISIONED|ACTIVE|ARCHIVED|DECLINED>] show backupcodes (2-step verification)
moderate_new_members|moderate_none| gam info|delete course <id or alias> update backupcodes
moderate_non_members delete backupcodes
primary_language <language> Domain Verification gam course <id or alias> <command>
where <command> is:
deprovision (remove tokens, asps,
reply_to and backupcodes)
gam create verify <domain> add student|teacher <email address>
reply_to_custom|reply_to_ignore|reply_to_list| gam update verify <domain> <cname|txt|site|file> gam print tokens [todrive] [clientid <ClientID>] <who>
reply_to_managers|reply_to_owner|reply_to_sender add|delete alias <alias>
gam info verify gam <who> show tokens
send_message_deny_notification true|false sync students|teachers group <group email> |ou
show_in_group_directory true|false <orgunit> | file <filename> |query <users query> | S/MIME
who_can_invite all_managers_can_invite|
all_members_can_invite
Domain Settings course <id or alias> gam user <email> add smime <file <filename>>
<password <password>> [default] [sendas <email>]
remove student|teacher <email address>
who_can_join gam info instance gam user <email> update smime [id <id>]
gam print courses [teacher <email>] [student <email>] [sendas <email>] <default>
all_in_domain_can_join|anyone_can_join| gam info domain|domainalias <domain>
can_request_to_join|invited_can_join [owneremail <email>] [state <states>] [todrive] gam user <email> delete smime <id <id>>
gam create domain <domain>
who_can_post_message all_in_domain_can_post| [aliases] [delimiter <String>] [sendas <email>]
gam create domainalias <domainalias>
all_managers_can_post|all_members_can_post| gam print course-participants [course <id or alias>] gam user <email> show|print smime primaryonly
<parentdomain>
anyone_can_post|none_can_post [student <email>] [teacher <email>] [show todrive
gam delete domain|domainalias <domain>
who_can_view_group all_in_domain_can_view| all|students|teachers] [todrive]
all_managers_can_view|all_members_can_view| gam print domains|domainaliases [todrive]
gam create guardianinvite <guardian email> <student
anyone_can_view gam update domain <domain> primary
email>
who_can_view_membership all_in_domain_can_view|
all_managers_can_view|all_members_can_view
gam delete guardian <guardian email> <student email> Reseller
gam show guardian [invitedguardian <guardian email>]
allow_google_communication true|false gam create|update resoldcustomer <domain>
allow_web_posting true|false [student <StudentItem>] [invitations] [states
[alternateemail <email>] [phone <phone>] [address1
<GuardianStateList>] [<UserTypeEntity>]
archive_only true|false
custom_reply_to <email address>
Various gam print guardians [invitations] [student <email>]
<address>] [address2 <address>] [address3
<address>] [contact <name>] [country <country>]
is_archived true|false gam version [simple|extended] [timeoffset] [invitedguardian <email>] [user <username>|group
max_message_bytes <integer> [city <city>] [organizationname <name>] [postalcode
[location] [check] <email>|ou <ouname>|all users] [nocsv] [todrive]
members_can_post_as_the_group true|false <code>] [region <region>] [transfertoken <token>]
gam version|help [states <GuardianStateList>]
message_display_font default_font|fixed_width_font gam info resoldcustomer <domain>
gam create|update project where GuardianStateList is:
spam_moderation_level allow|moderate| gam create resoldsubscription <domain> [dealcode
silently_moderate|reject gam whatis <user email> COMPLETE|PENDING| <code>] [plan <plan>] [purchaseorderid <po>]
include_in_global_address_list true|false GUARDIAN_INVITATION_STATE_UNSPECIFIED [seats <number> [max]] [sku <sku>] [transfertoken
who_can_leave_group none_can_leave| gam cancel guardianinvitation|guardianinvitations <token]
all_members_can_leave|all_managers_can_leave <GuardianInvitationID> <student email> gam update resoldsubscription <domain> <sku>
who_can_contact_owner anyone_can_contact|
[activate] [suspend] [startpaidservice] [renewal
all_in_domain_can_contact|
all_members_can_contact| all_managers_can_contact
Reports <renewaltype>] [seats <number> [max]] [plan
gam report users [todrive] [date <YYYY-MM-DD>] <plan> [seats <number> [max]] [purchaseorderid
gam info group <group email> [nousers] [noaliases]
[groups] [user <user email>] [filter <filter terms>] [fields
<included fields>]
Data Transfers <po>] [dealcode <code>]]
gam info resoldsubscriptions <domain> [transfertoken
gam update group <group email> add|update|sync
owner|member|manager gam report admin|calendar|logins| gam create datatransfer <old owner> gdrive|calendar <token>]
[allmail|nomail|daily|digest] [notsuspended] {user tokens|drive|groups|mobile [todrive] [user <user <new owner> [parameter <value>] gam delete resoldsubscription <domain> <sku>
<email address> | group <group address> |ou <org email> [filter <filter terms>] [ip <ip address>] [start gam info datatransfer <id> <deletiontype>
name> | file <file name> | all users} <start datetime>] [end <end datetime>] [event <event gam print datatransfers [oldowner <old owner>] To perform actions for a resold customer set following
gam update group <group email> clear [owner] [newowner <new owner>] [status completed|failed|
name>] environment variable and then run gam as per normal.
[manager] [member] inProgress|pending] [todrive]
gam update group <group email> remove {user <email where the filter specifies the search terms1. export CUSTOMER_ID=<customer id>
gam print transferapps
address> | group <group address> | org <org gam report usage user|customer parameters <comma
name> | file <file name> | all users} separated parameters> [start_date <YYYY-MM-DD>]
gam delete group <group email> gam <who> delete
[end_date <YYYY-MM-DD>] [orgunit <ou of users>]
group
gam print groups [domain <domain>] [member <user [skip_dates <YYYY-MM-DD>...] [skip_days_of_week Alerts
email>] [maxresults <results>] [name] [description] mon,tue...] [todrive] [users|group|csvfile] Admin Roles gam create alertfeedback <alertid> NOT_USEFUL|
[admincreated] [id] [aliases] [members] [owners] gam report domain [todrive] [date <YYYY-MM-DD>] gam create admin <user> <role> <customer|org_unit SOMEWHAT_USEFUL|VERY_USEFUL|
[managers] [settings] [todrive] [delimiter [fields <included fields>]
<delimchar>] [fields <list,of,fields>] <OU>> ALERT_FEEDBACK_TYPE_UNSPECIFIED
gam print group-members [group <group email>] <start datetime> and <end datetime> are in the format: gam delete admin <role assignment id> gam print alert|alertfeedback
[domain <domain>] [member <user email>] [fields YYYY-MM-DDThh:mm:ss.000Z gam print admins [user <user>] [role <role>] [todrive] gam delete|undelete alert <alertid>
<list,of,fields>] [membernames] [todrive] 1 https://developers.google.com/admin-sdk/reports/v1/reference/userUsageReport/get gam print roles [todrive]

DISCLAIMER: This is a reference sheet for people familiar with GAM and is provided “as-is”. You use it at your own risk! Always test commands before running them in a production environment.
https://gamcheatsheet.com/ gam@gamcheatsheet.com 2 © Copyright 2020 Glen Pringle Version 1.6.3, 20th August, 2020
Chrome Devices Licenses CloudPrint Bulk Operations
gam update cros <device id> [user <user info>] gam <who> add|delete license <sku> CloudPrint support has been dropped from GAM as of version 5.11 gam csv|csvtest <csv-filename> gam <regular
[location <location info>] [notes <notes info>] [ou gam <who> update license <sku> [from] <oldsku> as CloudPrint is deprecated and won't be available after 2020. command>
<new org unit>] [assetid <asset id>] [status gam print licenses [todrive] [products <product>]|[sku gam printer register Arguments starting with ~ will be substituted with the
active|deprovisioned|inactive|returnapproved|retur <sku>]|allskus|gsuite] [countsonly] gam update printer <id> [quotaEnabled <true|false>] value from the CSV row. For example:
where <sku> is: [dailyQuota <number>] [public <true|false> [name
nrequested|shipped|unknown] gam csv newusers.csv gam create user ~Email firstname
free|gafw|gafg|gams|gal|gau|gae|e4e|coordinate| <name>] [proxy <proxy>] [description
gam update cros <device id> action ~Firstname lastname ~Lastname password
vault|vfe|identity|identitypremium|coordinate|20gb <description>] [currentquota <Number>]
disable|reenable|deprovision_same_model_replace [defaultdisplayname <String>] [displayname ~Password gal off changepassword off org
|50gb|200gb|400gb|1tb|2tb|4tb|8tb|16tb|chrome
|deprovision_different_model_replace|deprovision_r <String>] [firmware <String>] [gcpversion <String>] Testing/Students
and <product> is: [istosaccepted <Boolean>] [manufacturer <String>]
etiring_device
Google-Apps|Google-Drive-storage|Google-Vault| Note that the ~ (tilde) character may need to be escaped
[acknowledge_device_touch_requirement] [model <String>] [ownerid <EmailAddress>] [status
Google-Coordinate|Google-Chrome-Device- <Number>]|[type <String>]|[uuid <String>]| in some environments.
gam info cros <device id> [nolists] [listlimit <Number>]
Management [setupurl|supporturl|updateurl <URL>]* Locally filter CSV output using the environment
[allfields|full|basic] [start <Date>] [end <Date>] gam info printer <id> [everything] variables GAM_CSV_HEADER_FILTER (comma-
<CrOSFieldName>* [fields <CrOSFieldNameList>] gam delete printer <id>
separated list of column headers) and
[downloadfile latest|<Time>] [targetfolder gam print printers [query <query>] [type <type>]
[status <status>] [extrafields <connectionStatus| GAM_CSV_ROW_FILTER (JSON string containing
<FilePath>]
gam print cros [query <query>|queries <query>+]
Custom User Schema semanticState|uiState|queuedJobsCount>] [todrive] column to filter on and value we want).
gam printer <id> <command> GAM_CSV_HEADER_DROP_FILTER removes listed
[orderby location|user|lastsync|serialnumber| gam create | update schema <schemaname> field
<fieldname> type where <command> is: headers from results.
supportenddate [ascending|descending] ]
add user|manager|owner <group or user email>| Run multiple gam commands from batch file:
[basic|full|allfields] [start <Date>] [end <Date>] <bool|double|email|int64|phone|string> [indexed]
[domain:]<DomainName>|public
[nolists|recentusers|timeranges|devicefiles] [restricted] [multivalued] [range <min number> gam batch <batch-filename>
remove <group or user email>|<domain>|public
<max number>] endfield showacl When the command “commit-batch” is found, all
[todrive] [listlimit <Number>] [limit_to_ou <OU>]
gam print|show schemas previous commands will be completed before execution
<CrOSFieldName>* [fields <CrOSFieldNameList>] gam printjob <printer id> submit <file or url> [title
gam info schema <schemaname> <string>] [tag <string>]
gam print crosactivity [query <query>|queries continues.
gam delete schema <schemaname> gam printjob <id> cancel|delete
<query>+] [todrive] [limittoou <OU>] [recentusers]
gam printjob <PrintJobID> resubmit <PrinterID>
[timeranges] [both] [devicefiles] [all] [listlimit gam printjob <PrinterID>|any fetch [olderthan|
<limit>] [delimiter <char>] [start <yyyy-mm-dd>] newerthan <number><m|h|d>] [query <query>]
[end <yyyy-mm-dd>] [status done|error|in_progress|queued|submitted| Parallel Commands
Vault held] [orderby create_time|status|title] [owner <user For both csv and batch commands, GAM will run
gam create vaultmatter [name <name>] [description email>] [limit <number>] [ascending|descending]
Mobile Devices <description>] [collaborators <emails>] gam print printjobs [older_than <number><m|h|d>]
multiple actions in parallel. By default, GAM starts 5
[newer_than <number><m|h|d>] [query <query>] worker threads and can run 5 commands at a time. You
gam update mobile <mobile id>|query:<query> action gam update vaultmatter <nameOrId> [name <name>]
[status <status>] [printer <printer id>] [owner <user can raise or lower this setting by setting an environment
wipe|approve|block| [description <description>] [addcollaborators
email>] [limit <number>] [orderby create_time| variable called GAM_THREADS.
cancel_remote_wipe_then_activate| <emails>] [removecollaborators <emails>] [action
status|title] [ascending|descending] [todrive]
cancel_remote_wipe_then_block [model <String>] close|reopen|delete|undelete] gam info vaultmatter Going much higher than 20 threads is not recommended
[os <String>] [useragent <String>] <nameOrId> or you’re likely to see issues with Google API quotas.
gam info mobile <mobile id> gam print vaultmatters [todrive] [basic] gam create
gam print mobile [query <query>][basic|full] [orderby vaulthold <matter nameOrId> [name <name>]
deviceid|email|lastsync| [corpus mail|drive|groups] [query <query>]
[accounts <emails>] [orgunit <orgunit>] [starttime
Customer
model|name|os|status|type]
gam info customer
[ascending|descending] [todrive] YYYY-MM-DD] [endtime YYYY-MM-DD]
gam update hold <HoldNameOrId> <matter gam update customer [alternateemail <EmailAddress>]
OAuth Key Management
gam delete mobile <mobile id>
<MatterNameOrId>> [query <query>] [orgunit [language <LanguageCode] [phone <String>] Set the variable OAUTHFILE in your shell to the file
<orgunit>] [addaccounts <emails>] [removeaccounts [organizationname <String>] [contactname <String>] containing the OAuth credentials and the variable
<emails>] [starttime YYYY-MM-DD] [endtime YYYY- [countrycode <String> [addressline1 <String>] OAUTHSERVICEFILE to the file containing the service
MM-DD] [addressline2 <String>] [addressline3 <String>] account JSON key. The file must be in the same folder as
gam info|delete vaulthold <HoldNameOrId> matter [locality <String>] [region <String>] [postalcode
gam.exe/gam.py or contain a path relative to this folder.
<MatterNameOrId> <String>] [countrycode <String>]
Organizational Units gam print vaultholds [matters <matters>] [todrive] gam gam oauth info [<access token>]
gam create org <name> [description <Description>] create export [matter <matter>] [name <name>] gam oauth create [<EmailAddress>]
[parent <Parent Org>] [inherit|noinherit] [corpus <drive|mail|groups|hangouts_chat>] [scope gam oauth create [admin <EmailAddress>]
gam update org <name> [name <Name>] [description <all_data|held_data|unprocessed_data>] [accounts Definitions [scope|scopes <APIScopeURLList>]
<Description>] [parent <Parent>] [inherit|noinherit] <emails> | orgunit <orgunit>|teamdrives gam oauth revoke
<who> user <user email>|group <group
gam update org <name> add|move users <Users>| <teamdrives> | rooms <rooms> | everyone] [terms gam show sakey [all|system|user]
email>|ou <ouname>|all users
file <File Name>|group <Group Name>|all cros <terms>] [start <date>] [end <date>] [timezone gam rotate sakey [local_key_size <1024|2048|4096>]
<datetime> RFC3339 formatted date and time,
|cros <device id> <timezone>] [format mbox|pst] [excludedrafts [retain_none|retain_existing|replace_current]
e.g. YYYY-MM-DDThh:mm:ss.000Z
gam info org <name> [nousers|child] true|false] [driveversiondate <date>] [algorithm KEY_ALG_RSA_1024|
gam delete org <name> [includeteamdrives] [includerooms] <user email> is a user in the domain
KEY_ALG_RSA_2048]
gam print orgs [todrive] [toplevelonly] [fromparent [includeaccessinfo true|false] <group email> is a group in the domain
gam delete sakeys <key_ids> [doit]
<name>] [allfields|<list of fields>] gam info|download export <matter> <export> <email address> is any email address

DISCLAIMER: This is a reference sheet for people familiar with GAM and is provided “as-is”. You use it at your own risk! Always test commands before running them in a production environment.
https://gamcheatsheet.com/ gam@gamcheatsheet.com 3 © Copyright 2020 Glen Pringle Version 1.6.3, 20th August, 2020
Environment Variables
The following environment variables are supported.
GAMUSERCONFIGDIR
GAMSITECONFIGDIR
GAMCACHEDIR
GAMDRIVEDIR
OAUTHFILE
OAUTHSERVICEFILE
CLIENTSECRETS
GA_DOMAIN
CUSTOMER_ID
GAM_CHARSET
GAM_THREADS
GAM_AUTOBATCH
GAM_BATCH_SIZE
GAM_CSV_HEADER_FILTER
GAM_CSV_HEADER_DROP_FILTER
GAM_CSV_ROW_FILTER
GAM_TLS_MIN_VERSION
GAM_TLS_MAX_VERSION
GAM_CA_FILE

DISCLAIMER: This is a reference sheet for people familiar with GAM and is provided “as-is”. You use it at your own risk! Always test commands before running them in a production environment.
https://gamcheatsheet.com/ gam@gamcheatsheet.com 4 © Copyright 2020 Glen Pringle Version 1.6.3, 20th August, 2020

You might also like