Advanced Gam Cheat Sheet

ADVERTISEMENT

Advanced GAM Cheat Sheet
User Drive Management
Users
gam <who>spam messages|threads (((query
GAMADV-X 4.39.14 vs GAM 4.03
gam <who> show filetree [anyowner|(showownedby any|
<QueryGmail>) (matchlabel <LabelName>) [or|and])+
me|others)] [select <DriveFileEntity>|orphans]
[quick|notquick] [doit] [max_to_spam|max_to_process
[depth <Number>] (orderby <DriveOrderByFieldName>
Sites
Audit
<Number>])|(ids <MessageIDEntity>)
[ascending|descending])*
gam <who>show messages|threads (((query
gam <who> print|show filelist [todrive
<QueryGmail>) (matchlabel <LabelName>) [or|and])*
gam [<who>] create site <SiteItem> <SiteAttributes>*
gam audit uploadkey
<ValueReadFromStdin>
[<ToDriveAttributes>]] [anyowner|(showownedby any|
[quick|notquick] [max_to_show|max_to_process
gam [<who>] update sites <SiteEntity> <SiteAttributes>+
gam audit activity request <EmailAddress>
me|others)] [query <QueryDriveFile>]
<Number>] [includespamtrash])|
gam [<who>] info sites <SiteEntity> [withmappings]
gam audit activity delete <EmailAddress> <RequestID>
[fullquery <QueryDriveFile>] [select <DriveFileEntity>|
(ids <MessageIDEntity>) [headers <String>]
gam audit activity download <EmailAddress>
[role|roles all|<SiteACLRoleList>]
orphans] [depth <Number>] [filepath] [allfields|
[showlabels] [showsize] [showsnippet]
gam [<who>] show sites [domain|domains
<RequestID>
<DriveFieldName>*] (orderby <DriveOrderByFieldName>
gam <who>print messages|threads (((query
<DomainNameEntity>] [includeallsites]
gam audit activity status [<EmailAddress> <RequestID>]
[ascending|descending])* [delimiter <String>]
<QueryGmail>) (matchlabel <LabelName>) [or|and])*
[withmappings] [role|roles all|<SiteACLRoleList>]
gam <who> print|show driveactivity [todrive
gam audit export request <EmailAddress>
[quick|notquick] [max_to_print|max_to_process
[maxresults <Number>]
[<ToDriveAttributes>]] [fileid <DriveFileID>]
[begin <DateTime>] [end <DateTime>]
<Number>] [includespamtrash])|
gam [<who>] print sites [todrive [<ToDriveAttributes>]]
[folderid <DriveFolderID>]
[search <QueryGmail>] [headersonly] [includedeleted]
(ids <MessageIDEntity>) [headers <String>]
[domain|domains <DomainNameEntity>]
gam <who> print|show drivesettings
gam audit export delete <EmailAddress> <RequestID>
[showlabels] [showsize] [showsnippet] [todrive] [idfirst]
[includeallsites] [withmappings] [role|roles all|
[todrive [<ToDriveAttributes>]]
gam audit export download <EmailAddress>
<SiteACLRoleList>] [maxresults <Number>]
<RequestID>
gam <who> delete|del emptydrivefolders
[convertcrnl] [delimiter <String>]
gam audit export status [<EmailAddress> <RequestID>]
gam <who> purge drivefile <DriveFileEntity>
gam [<who>] print siteactivity <SiteEntity>
gam audit export watch <EmailAddress> <RequestID>
gam <who> trash drivefile <DriveFileEntity>
Contacts
[todrive [<ToDriveAttributes>]] [maxresults <Number>]
gam audit monitor create <EmailAddress>
gam <who> untrash drivefile <DriveFileEntity>
[updated_min yyyy-mm-dd] [updated_max yyyy-mm-dd]
<DestEmailAddress> [begin <DateTime>]
gam <who> copy drivefile <DriveFileEntity> [newfilename
gam [<who>] add|update siteacls
[end <DateTime>] [incoming_headers]
<DriveFileName>] [recursive] [parentid <DriveFolderID>]
gam create contact <ContactAttributes>+
<SiteEntity> <SiteACLRole> <ACLScopeEntity>
[outgoing_headers] [nochats] [nodrafts]
[parentname <DriveFolderName>]
gam update contacts <ContactEntity>
gam [<who>] delete|info siteacls
[chat_headers] [draft_headers]
gam <who> show filepath <DriveFileEntity>
<ContactAttributes>+
<SiteEntity> <ACLScopeEntity>
gam audit monitor delete <EmailAddress>
gam delete contacts <ContactEntity>|
gam [<who>] show siteacls <SiteEntity>
<DestEmailAddress>
ACLs
([query <QueryContact>] [emailmatchpattern
gam audit monitor list <EmailAddress>
gam <who> add drivefileacl <DriveFileEntity>
<RegularExpression>]
anyone|(user <UserItem>)|(group <GroupItem>)|
[emailmatchtype work|home|other|<String>]
(domain <DomainName>) (role <DriveFileACLRole>)
[updated_min yyyy-mm-dd]
Calendar ACLs, Events
[withlink|(allowfilediscovery <Boolean>)]
gam info contacts <ContactEntity> [basic|full]
Domain Settings
[expiration <Time>] [sendmail] [emailmessage <String>]
[showgroups] [fields <ContactFieldNameList>]
[showtitles]
gam <who> show contacts [query <QueryContact>]
gam calendar <calendar email> <action> [<options>]
gam <who> update drivefileacl <DriveFileEntity>
gam update instance sso_settings [enabled <Boolean>]
[emailmatchpattern <RegularExpression>]
<DriveFilePermissionIDorEmail> (role <DriveFileACLRole>)
where action and options are:
[sign_on_uri <URI>] [sign_out_uri <URI>]
[emailmatchtype work|home|other|<String>]
[withlink|(allowfilediscovery <Boolean>)]
[password_uri <URI>] [whitelist <CIDRnetmask>]
[updated_min yyyy-mm-dd] [basic|full] [showgroups]
update event <EventIDEntity> <EventAttributes>+
[expiration <Time>] [removeexpiration <Boolean>]
[orderby <ContactOrderByFieldName>
[use_domain_specific_issuer <Boolean>]
move event <EventIDEntity> to <CalendarItem>
[transferownership <Boolean>] [showtitles]
[ascending|descending]]
gam update instance sso_key <FileName>
show|wipe events
gam <who> delete drivefileacl <DriveFileEntity>
[showdeleted] [fields <ContactFieldNameList>]
gam update instance logo <FileName>
<DriveFilePermissionIDorEmail> [showtitles]
add|update acl <CalendarACLRole> <ACLScope>
gam print contacts [todrive] [query <QueryContact>]
gam info instance [logo <FileName>]
gam <who> show drivefileacl <DriveFileEntity> [showtitles]
del acl [<CalendarACLRole>] <ACLScope>
[emailmatchpattern <RegularExpression>]
gam <who> add permissions <DriveFileEntity>
[emailmatchtype work|home|other|<String>]
info acl <ACLScopeEntity>
<DriveFilePermissionEntity> [expiration <Time>]
[updated_min yyyy-mm-dd] [basic|full] [showgroups]
show acls
[sendmail] [emailmessage <String>]
[orderby <ContactOrderByFieldName>
Bulk Operations
gam <who> delete permissions <DriveFileEntity>
[ascending|descending]]
<DriveFilePermissionIDEntity>
[showdeleted] [fields <ContactFieldNameList>]
User Email
gam <who> transfer ownership <DriveFileEntity>
gam csv <FileName>|- [charset <Charset>]
gam <who> create contactgroup
<UserItem> [includetrashed]
[columndelimiter <String>] [fields <FieldNameList>]
<ContactGroupAttributes>+
(orderby <DriveOrderByFieldName>
(matchfield <FieldName> <RegularExpression>)*
gam <who> update contactgroup
gam <who> deprovision
[ascending|descending])* [preview] [filepath]
gam <GAMArgumentList>
<ContactGroupItem> <ContactGroupAttributes>+
[todrive [<ToDriveAttributes>]]
gam <who> delete contactgroups
gam <who> claim ownership <DriveFileEntity>
<ContactGroupEntity>
[skipids <DriveFileEntity>] [skipusers <UserTypeEntity>]
gam <who> info contactgroups
Chrome Devices
[subdomains <DomainNameEntity>] [includetrashed]
File Redirection
<ContactGroupEntity>
[writerscantshare] [preview] [filepath]
gam <who> show contactgroups
[todrive [<ToDriveAttributes>]]
[updated_min yyyy-mm-dd]
gam list [todrive [<ToDriveAttributes>]] <EntityList>
gam [<Select>] [<Config>] [<Redirect>] [any gam cmd]
[basic|full] [showdeleted]
[data <CrOSTypeEntity>|
[orderby <ContactOrderByFieldName>
<Redirect> is:
<UserTypeEntity> [delimiter <String>]]
[ascending|descending]]
redirect csv <FileName> [multiprocess] [append]
gam <CrOSTypeEntity>|<UserTypeEntity> list
gam <who> print contactgroups [todrive]
[noheader] [charset <Charset>]
This sheet lists additional commands that appear in
[todrive [<ToDriveAttributes>]]
[updated_min yyyy-mm-dd] [basic|full] [showdeleted]
[columndelimiter <Character>] |
Ross Scroggs’ advanced/extended version of GAM when
[data <EntityList> [delimiter <String>]]
[orderby <ContactOrderByFieldName>
redirect stdout <FileName> [append] |
compared to the normal version of GAM.
gam <UserTypeEntity> check serviceaccount
[ascending|descending]]
redirect stderr <FileName> [append]
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.
1
Ve rs io n 0 . 1 , 1 1
Jan ua r y, 2 0 1 7
t h

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go