IMPORTANT! GAM is not covered by the G Suite Support SLA! The tool is well documented but is very much a DIY tool!
Creating Resources
./gam create resource ed101 "ED101 Conference Room" description "Purpose, contains objects, dimensions, etc" type "Conference Room"
Creating resource calendar
./gam create resource business-calendar "Acme Inc. Business Calendar"
Creating resource Calendar from CSV
./gam csv Resources.csv gam create resource ~id ~common description ~description type ~type
Deleting Resource Calendar from CSV
./gam csv Delete.csv gam info resource ~id > resourceemails.csv
Updating User
./gam update user esstudentc@testdomain.com org "Elementary School/Elementary School Students"
Output Full Organizational Unit (OU) Structure
./gam print orgs name description parent inherit > orgs.csv
Update Organizational Unit (OU) Name (note: double quotes req for spaces)
./gam update org AfW name "Android for Work"
Delete Organizational Unit
./gam delete org Test1
Create Groups
./gam csv groups.csv gam create group ~email name ~Name description ~description
Add User to Group
./gam update group classroom_teachers add member esteacherb@testdomain.com
Output Members of Group
./gam print group-members group classroom_teachers
Remove User from Group
./gam update group classroom_teachers remove member esstudentc@testdomain.com
Output All User Information to CSV
./gam print users allfields > users.csv
Delete users from a CSV
./gam csv DeleteUsers.csv gam delete user ~user
Create users from a CSV
./gam csv new.csv gam create user ~account firstname ~first lastname ~last password ~password org ~org changepassword no gal on
Update additional user information from a CSV
./gam csv gal.csv gam update user ~user phone type "~type1" value "~phone1" "~primary1" phone type "~type2" value "~phone2" "~primary2" phone type "~type3" value "~phone3" "~primary3" phone type "~type4" value "~phone4" "~primary4"
Create schema
./gam create schema Office field building type string indexed restricted endfield field floor type string indexed restricted endfield
Updating users from a CSV
./gam csv gal.csv gam update user ~user Office.building "~location"
Bulk creating users from a CSV
./gam csv add.csv gam create user ~EmailAddress firstname ~"firstname" lastname ~"lastname" password ~password changepassword off gal on org ~"org"
Bulk updating users from a CSV
./gam csv gal.csv gam update user ~EmailAddress address type work streetaddress ~"StreetAddress" locality ~"City" region ~"State" postalcode ~"ZipCode" countrycode ~"Country" primary phone type work value ~"phone" primary
Deleting groups from a CSV
./gam csv delete.csv delete group ~group
Print all group information to a CSV
./gam print groups allfields > groups.csv
Add users to group from a CSV
./gam csv update.csv gam update group ~email name ~name description ~description
Create groups from a csv
/gam csv create.csv gam create group ~email name ~"name" description ~"description"
Group Sync
./gam csv groups.csv gam update group ~email sync member ou ~"ou"
Display all group membership of a group
./gam print group-members group elementary_school_everyone@testdomain.com membernames
Update group to include all users in an OU and all Children OU ( Everyone in the /Elementary School OU )
./gam update group elementary_school_everyone@testdomain.com sync member ou_and_children "/Elementary School"
./gam update group all_high_school_students@testdomain.com sync member ou "/High School/Students"
Update group to include all users in a specific OU ( All Teachers in this case )
./gam update group all_elementary_teachers@testdomain.com sync member ou "/Elementary School/Teachers"
./gam update group all_kindergarten@testdomain.com sync member ou "/High School/Teachers"
Update group to include all users in an OU and all Children OU
./gam update group admin_staff_everyone@testdomain.com sync member ou_and_children "/District Staff/Administrative Staff"