GAM – Google Apps Manager

GAMADV-xtd3 is a command-line tool for managing Google domains and it works very well for many things. This is a list of some tasks I use from time-to-time.

  1. Put users into an OU. The target OU in this case is iPads – Pangyo, a subgroup of our Organizational Emails OU. I put a list of usernames into a text file (ipads.txt) saved in my GAM folder and ran the following in Terminal:
    gam update org "Organizational Emails/iPads - Pangyo" add file ipads.txt
  2. Suspend Google accounts of departed faculty: create a one-column file departed.csv with header Email containing departed faculty email addresses.
    gam csv gam update user ~Email suspended true
  3. Find all groups with suspended users: We notice that suspended users still show up in mail groups. In order to identify and remove them, the following will list all groups followed by the number (and emails) of suspended accounts still appearing in each group. In the latter list, if one sees something like:
    groupname@domain.com,2,sususer01@domain.com,sususer02@domain.com
    this means that sususer01 & 02 are suspended accounts that are still members of the group groupname.
    gam print groups members suspended
  4. Remove Suspended Users from all groups: Along with the previous tip, to remove a user from all groups, just use:
    gam user sususer01@domain.com delete groups
  5. Using GAM with Multiple Domains: I use GAMADV-XTD3 with two Google domains. Once one is set up, the other can be added by editing the gam.cfg file to have the following lines at the end:
    [faculty] 
    domain = facultydomain.edu
    customer_id = facultyDomainCustomerID#
    config_dir = faculty

    [students]
    domain = studentdomain.edu
    customer_id = studentDomainCustomer#
    config_dir = students
    Then create sub-folders faculty and students. In each folder, place the respective client_secrets.json and oauth2service.json files.
  6.  

Banning Google Group Members from Receiving Email

At KIS, we assign our school-owned iPads Google accounts. But since they’re in our staff domain, they’re automatically added to our allstaff email group and receive all the email sent to that group. We don’t want these emails to show up in the iPad mail app and needed a way to remove those addresses from the group mail list. This is the method we use:

First access Google Groups Service for the allstaff group by selecting the group in the Google Admin Control Panel, clicking “Manage users in allstaff” and clicking “View in Groups service”.  On the next screen, click on the Manage link.
allstaff-group01

On the left-hand menu, select Direct add members.
google_groups02

Add the accounts you wish to eliminate from the list.

google_groups03

Select those recently added members and from the Actions menu select Ban.

google_groups04