1 of 96

GAM

Google Apps Manager

The Swiss Army Knife for

Google Apps Domain Administrators

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

2 of 96

Brian Gray

St. Stephen’s Episcopal School

google.com/+BrianGray

BrianGray.org/GAM

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

3 of 96

GAM

Google Apps Manager

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

4 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

5 of 96

Users

  • Create a User
  • Update and Rename a User
  • Set User Profile Details
  • Set Custom User Schema Fields
  • Get User Info
  • Change Password
  • Suspend a User
  • Delete a User
  • Undelete a User

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

6 of 96

Create & Update a User

gam create user droth

firstname "David Lee"

lastname Roth

password 'MightAsWellJump!'

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

7 of 96

Update a User

gam update user droth

password jumpJump42

suspended on

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

8 of 96

Create an Organizational Unit

gam create org Musicians

description

"People We Don't Know"

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

9 of 96

Move a User to an Organizational Unit

update user droth ou /Musicians

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

10 of 96

Create a user in a Specific OU

gam create user eVanHalen

firstname Eddie

lastname "Van Halen"

password Eruption42

ou /Musicians

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

11 of 96

Get User Info

gam info user droth

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

12 of 96

All Info for All Users to Spreadsheet

gam print users allfields todrive

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

13 of 96

All Info for All Users to Spreadsheet

emails.0.address

emails.0.primary

id

ipWhitelisted

isAdmin

isDelegatedAdmin

isMailboxSetup

lastLoginTime

name.familyName

name.fullName

name.givenName

includeInGlobalAddressList

primaryEmail

agreedToTerms

aliases.0

aliases.1

aliases.2

aliases.3

aliases.4

changePasswordAtNextLogin

creationTime

customerId

orgUnitPath

suspended

thumbnailPhotoEtag

thumbnailPhotoUrl

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

14 of 96

Get Info About Some Users

gam print users

query "orgUnitPath='/Others'"

allfields todrive

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

15 of 96

Get Info About Some Users

gam print users

query "orgUnitPath='/Others'"

allfields todrive

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

16 of 96

Get Info About Some Users

gam print users

query "orgUnitPath='/Others'"

ou

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

17 of 96

Google Classroom

  • Create, Update, Delete a course
  • Assign an alias to a course
  • Add, Sync, Remove Students and Teachers
  • Print List of Courses
  • Print List of Course Participants

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

18 of 96

Create a Course

gam create course

alias Algebra-s01-1516

name "Geometry"

section s01

heading "All about Angles"

room Eudoxus-3

teacher euclid@alexandria.edu

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

19 of 96

Update a Classroom

gam update course

Algebra-s01-1516

name "Euclidean Geometry"

room Eudoxus-1

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

20 of 96

Assign Students to a Course

gam course Algebra-s01-1516

add student proclus@alexandria.edu

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

21 of 96

Sync Student Roster to a Course Enrollment

gam course Freshman-Health-1516

sync students ou /Students/2019

gam course Algebra-s01-1516

sync students file Roster-s01.txt

gam course Algebra-s01-1516

sync students course Bio-s01-1516

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

22 of 96

Sync Teacher Roster to a Course Enrollment

All sync options work for Course teachers, too:

gam course Algebra-s01-1516

sync teachers file Teachers-s01.txt

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

23 of 96

Print a List of Courses

gam print courses todrive

gam print courses teacher socrates@athens.edu

gam print courses student plato@athens.edu todrive

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

24 of 96

Print a List of Course Participants

gam print course-participants todrive

gam print course-participants Algebra-s01-1516

gam print course-participants teacher eKrabappel@sisd.edu

gam print course-participants student bSimpson@sisd.edu

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

25 of 96

Google Groups

  • Create a Group
  • Update and Rename a Group
  • Add Members/Owners/Managers to a Group
  • Update Members/Owners/Managers in a Group
  • Sync owners/members/managers to a Group
  • Remove Users from a Group
  • Get Group Info
  • Delete a Group

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

26 of 96

Create a Group

gam create group FamousPeople

name “Famous People”

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

27 of 96

Update a Group

gam update group FamousPeople

description "People who have never been in my kitchen"

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

28 of 96

Add a User to a Group

gam update group FamousPeople

add owner user eVanHalen

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

29 of 96

Remove a User from a Group

gam update group FamousPeople

remove owner user eVanHalen

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

30 of 96

Sync Group to OU

gam update group FamousPeople

sync member

ou_and_children "Musicians"

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

31 of 96

Sync a Group to a File

gam update group FamousPeople

sync member file VIP-list.csv

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

32 of 96

Hide a Group

gam update group FamousPeople

show_in_group_directory false

gam update group FamousPeople

include_in_global_address_list false

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

33 of 96

Devices

  • Perform Wipe, Account Wipe, etc. on Mobile Devices
  • Get Info on a Mobile Device
  • Delete a Mobile Device

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

34 of 96

Wipe a Mobile Device

gam update mobile AFiQxQ8n action wipe

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

35 of 96

Device Commands

gam info mobile

gam delete mobile AFiQxQ8n

gam info cros

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

36 of 96

Calendars

  • Create a Resource Calendar
  • Update a Resource Calendar
  • Retrieve Resource Calendar Information
  • Delete a Resource Calendar
  • List all Resource Calendars

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

37 of 96

Create a Resource Calendar

gam create resource Lab-1

“Computer Lab #1”

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

38 of 96

Get Info on Resource Calendar

gam info resource Lab-2

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

39 of 96

Update Resource Calendar Details

gam update resource Lab-2

type “Computer Lab”

description “Computer Lab #2”

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

40 of 96

Delete a Resource Calendar

gam delete resource Lab-1

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

41 of 96

Get info about all Resource Calendars

gam print resources

[description] [type]

[allfields] [todrive]

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

42 of 96

Calendars

ACL - Access Control List

user’s permission level on a calendar

User’s Calendar List

calendars that appear on calendar.google.com

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

43 of 96

Calendars - ACL

Calendar Access Control Lists

  • View a Calendar's ACL
  • Modify Calendar ACL
  • Add Users to a Calendar's ACL
  • Update a User Entry in a Calendar ACL
  • Delete Users from a Calendar's ACL

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

44 of 96

View Calendar Access Control List

gam calendar

droth@training.briangray.org

showacl

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

45 of 96

Add a User to a Calendar ACL

gam calendar droth add read eVanHalen

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

46 of 96

Update a User Permissions on a Calendar

gam calendar droth update editor eVanHalen

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

47 of 96

Delete User from Calendar ACL

gam calendar droth delete user eVanHalen

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

48 of 96

Calendars

User’s List of Calendars

  • View and Modify Calendars in List
  • Show the Calendars in List
  • Delete a Calendar from Calendars in List
  • Add a Calendar to List
  • Update a Calendar in Calendar List
  • Wipe a User's Primary Calendar

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

49 of 96

Show User’s List of Calendars

gam user eVanHalen show calendars

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

50 of 96

Add Calendar to User(s) List

gam user <user>|group <group>|ou <ou>|all users

add calendar <calendar email>

[selected true|false]

[hidden true|false]

[reminder email|sms|popup (minutes)]

[summary <summary>]

[colorindex (1-24)]

[backgroundcolor <htmlcolor>]

[foregroundcolor <htmlcolor>]

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

51 of 96

Add Calendar to User(s) List

gam user eVanHalen add calendar dRoth

selected true

hidden false

reminder email 10

colorindex 2

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

52 of 96

Delete Calendar from User(s) List

gam user <user>|group <group>|ou <ou>|all users

delete calendar <calendar email>

gam user eVanHalen delete calendar dRoth

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

53 of 96

Wipe a User’s Primary Calendar

gam calendar <user email> wipe

Works for user primary calendar only

  • not user secondary calendars
  • not resource calendar

No Undo - No Recovery

(unless you have a Cloud Backup service)

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

54 of 96

Email Settings

  • Set user language, shortcuts, arrow, etc
  • Set & Retrieve signatures
  • Enable & Disable Vacation Messages
  • Create, Retrieve & Delete Labels
  • Create Filters
  • Set Send As, Forward, IMAP, POP3
  • Add & Delete Delegates
  • Hide & Unhide users in GAL
  • Upload Photos

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

55 of 96

Add a Gmail Label to Accounts

gam all users label Secret

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

56 of 96

Show All Labels for a User

gam user brian show labels

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

57 of 96

Delete a Gmail Label

gam user bkg1 delete label Secret

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

58 of 96

Add & Delete Gmail Delegate

gam user droth delete delegate eVanHalen

gam user droth delegate to eVanHalen

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

59 of 96

Add & Remove Global Address List (Auto-complete)

gam update user droth gal off

gam update user droth gal on

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

60 of 96

Drive - Files & Folders

  • Put shared folder into every account’s My Drive
  • Printing User Drive Files to a CSV
  • Creating and Uploading Drive Files for Users
  • Updating Drive Files for Users
  • Downloading Drive Files For Users
  • Deleting Google Drive Files for Users

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

61 of 96

Drive - Put Shared Folder into My Drive

gam user targetUser@domain.org

update drivefile id xxxSHM

starred true

parentid root

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

62 of 96

Drive - Permissions

  • Showing the permissions of a File/Folder for a user
  • Adding permissions to a file/folder for a user
  • Updating permissions to a file/folder for a user
  • Removing permissions to a file/folder for a user

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

63 of 96

Security

  • List & Delete OAuth Tokens for Users
  • List & Delete Application Specific Passwords
  • List, Generate & Delete 2-Step Backup Codes
  • Deprovision a User

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

64 of 96

Cloud Print

  • Add & Delete Printers
  • List Printers & Get Detail about Printers
  • Share & Unshare Printers
  • List Printer ACL
  • Submit, Delete & Cancel Print Jobs
  • List Print Jobs

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

65 of 96

Domain

  • Get Domain Settings
  • Download & Upload Domain Logo
  • Change Secondary Email for Administrator
  • Get Email Routing & MX Information

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

66 of 96

Super-Admin and Delegated Admins

  • Grant a User an Admin Role
  • Delete a User's Admin Role
  • Print All Admin Role Assignments
  • Print All Admin Roles

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

67 of 96

Auditing

  • Create, List & Delete Monitors
  • Request, Retrieve, Download, Delete Activity Reports
  • Request, Retrieve, Download, Delete Email Exports

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

68 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

69 of 96

Bulk Commands

Use CSV data to Apply a Command to Many Users

  • CSV file
  • Output from another GAM command

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

70 of 96

Create Users in Specified OUs

1) Create a CSV file

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

71 of 96

Create Users in Specified OUs

2) Run GAM using the CSV file

gam csv TheBand.csv gam create

user ~Email

firstname ~Fname

lastname ~Lname

password ~Password

ou ~OU

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

72 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

73 of 96

Move all Users in OU to Another OU

gam print users

query "orgUnitPath='/Musicians'" |

gam csv -

gam update user ~primaryEmail

org /Others/Faculty

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

74 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

75 of 96

Delete Specific Email from Mailboxes

The Big Boss:

I just emailed the salary list

to all of the musicians!!

You:

No problem...I’ve got this!

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

76 of 96

Delete Specific Email from Mailboxes

  • Gather information
  • Test the search
  • Double-check
  • Re-double-check
  • Delete the messages

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

77 of 96

Delete Specific Email from Mailboxes

gam

user <username>|

group <groupname>|

ou <ouname>|

all users

delete|trash messages

query <gmail search>

[doit]

[max_to_delete <number>]

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

78 of 96

Test Deletion of Email from User Accounts

gam group FamousPeople

delete message

query 'subject:"Salary List"'

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

79 of 96

Delete Specific Email from Mailboxes

gam group FamousPeople

delete message

query 'subject:"Salary List"'

doit max_to_delete 1

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

80 of 96

Trash vs. Delete

Trash - move to Trash

Delete - remove from All Mail and Trash

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

81 of 96

Query Options

The query argument uses the syntax described in the Advanced Gmail Search help article.

to:

from:

cc:

bcc:

after:

before:

older_than:

newer_than:

rfc822msgid:

subject:

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

82 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

83 of 96

Mac and Linux Users

python gam.py info user

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

84 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

85 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

86 of 96

BrianGray.org/GAM

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

87 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

88 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

89 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

90 of 96

RGB

51 105 232

238 178 17

0 153 37

213 15 37

3369e8

eeb211

009925

d50f25

HEX

Color palette

34 34 34

70 70 70

110 110 110

147 147 147

RGB

177 177 177

212 212 212

233 233 233

222222

464646

6e6e6e

939393

HEX

b1b1b1

d4d4d4

e9e9e9

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

91 of 96

Product Logos

Drive

Gmail

Chrome

Sites

Android

Search

Calendar

Vault

Google+

Docs

Slides

Sheets

Forms

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

92 of 96

Google Tools

Demo Slam

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

93 of 96

Or Google Toolbox - We all have a box of tricks!!!

First, pick the task you want to accomplish �THEN decide what tool you need to use

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

94 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

95 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM

96 of 96

BrianGray.org • Google for Education Certified Trainer

for Education

BrianGray.org/GAM