User Tools

Site Tools


chromebooks:gam_notes

This is an old revision of the document!


GAM (Google Admin Command Line) Notes/Hints

Set Password

gam update user <username> password <password>

Create User

gam create user <username> firstname <fname> lastname <lname> password <password> changepassword off agreedtoterms off

Suspend User

gam update user <username> suspended on

Create Alias

gam create alias <new alias> user <target user>

Add Users to a Group

gam update group <GROUPNAME>  add member <EMAIL>
gam print orgs

Move Chrome Device to OU

gam update cros <device id> ou "<OU Path>"
gam update cros 04b697c1-32ef-419c-8e93-87d30c9d9eff ou "/Students/Elementary School/1st Grade"

Export Chrome Device CSV

gam print cros full listlimit 1 > CSVFILE

Disable ChromeOS Device

gam update cros e23455de-837a-4389-abdc-92a82526d7ac action disable

Reenable ChromeOS Device

gam update cros <Chrome Device ID> action reenable

Delete a specific email from a users Inbox (Use GAM not GAM-ADV)

Message-ID: <CANPNmCK3mxGzaFUOmV2KPz9K0VCAJg86dZyrChDEpRGPqbb5GQ@mail.gmail.com>

gam user <who> delete|trash|untrash messages|threads
 query <gmail search> [doit] [maxto<action> <number>]


gam user tschulz@g.sebeka.k12.mn.us delete messages query rfc822msgid:CANPNmCK3mxGzaFUOmV2KPz9K0VCAJg86dZyrChDEpRGPqbb5GQ@mail.gmail.com doit

gam all users delete messages query rfc822msgid:CANPNmCK3mxGzaFUOmV2KPz9K0VCAJg86dZyrChDEpRGPqbb5GQ@mail.gmail.com doit

GAM Cheat Sheet From gamcheatsheet.com

Transfer Google Drive file ownership

gam user <SRC Owner> add drivefileacl <FILEID> user <DEST Owner> role owner
gam print group-members group <Group Email> fields email,role,status

Delete file from Google Drive

filelist.csv

E<ROW>=VLOOKUP(F<ROW>,B$2:C$<LASTROW>,2,0)

gam user <email> show filelist id name owners parents > filelist.csv
gam user <email> delete drivefile <fileid> purge
chromebooks/gam_notes.1638989227.txt.gz · Last modified: 2021/12/08 12:47 by tschulz