Duration
1 day
Course Description
Google Apps Manager, or GAM for short, is a program that helps you manage common tasks for your Google Apps domain. It is especially helpful for running large batches of commands that would be very time consuming if done by hand.
GAM is different from many Google Apps tools in that it is not web based. GAM is a program you install locally on your computer and then run through a command line interface (old school style).
Step #1 - Enable the API’s for your GAFE domain
GAM does its work by using Google’s APIs (Application Programming Interface). Before you can use GAM you have to make sure API access is turned on. This is done in your GAFE admin console.
To enable Administrative API Access in your Google Apps admin console:
- Sign in to the Google Admin console.
- From the dashboard, go to Security, then API reference.
- Check Enable API access.
- Click Save changes.
Step #3 - Extract GAM
GAM will be downloaded as an archived file which you will need to extract based upon your operating system. Once extracted, the folder will need to be saved somewhere on your hard drive. I make GAM folders in the root of my C:Drive for each school I support.
Step #4 - Generate your client_secrets.json file
You will need to generate a special file that identifies your GAM install for Google. This file will be named client_secrets.json and will need to be placed in your GAM folder.
Step #5 - Run GAM the first time
- Open your browser and log into your Google Apps admin account. You will need to be logged in this one time for authorization purposes.
- Open a command prompt (click your Window button, type “cmd”)
- Navigate to the GAM folder
- Type: gam info domain
- After seeing some information about Dito (press Enter), you'll be asked to specify which "scopes" you'd like the OAuth token to support. For now, select the last option to continue, all scopes will be selected.
- Next GAM will open up a web page in order for you to grant access to retrieve data and make changes to your Google Apps account.
- Once you've granted access, switch back to the command prompt window.
- GAM should have displayed information about your Google Apps domain.
Get domain information
gam info domain
This command returns loads of information about your Google Apps domain including how many users you are approved for and how many users you currently have.
Create users
gam create user <email address> firstname <First Name> lastname <Last Name> password <Password> [suspended on|off] [changepassword on|off] [gal on|off] [admin on|off] [sha] [md5] [crypt] [nohash] [org <Org Name>]
This command allows you to create new users, set their password, turn off the requirement for users to reset their password, and put the users into their appropriate organization.
Update users
gam update user <email address> [firstname <First Name>] [lastname <Last Name>] [password <Password>] [email
<New Email>] [gal on|off] [admin on|off] [suspended on|off] [sha] [md5] [crypt] [nohash] [changepassword on|off] [org <Org Name>]
This command allows you to update existing users, set their password, turn off the requirement for users to reset their password, and put the users into their appropriate organization.
Sync group membership
gam update group <group email> sync owner|member|manager {user <email address> | group <group address> | org <org name> | file <file name> | all users}
This command updates Google Groups (email distribution lists) by adding and removing members to the group by comparing the current group members to the members provided in a list, file, organization, or other group. This is an easy and powerful way to update Groups for schools including class periods, grade levels, and more.
Executing Commands
Commands can be executed by by typing them in on the command line. However, when running multiple commands it is easier to run them as a batch file as follows.
- Using a spreadsheet (such as Google Sheets or Excel) create your list of executable commands.
- Copy the column that contains the GAM commands.
- Paste the copied commands into a text editor.
- Save the commands as a batch file, that is, a file that ends with a .bat extension.
- Save that file in your GAM directory.
- Open a command prompt and navigate to your GAM folder.
- Run the batch file from the command prompt.
Programme scope, delivery arrangements and suitability are confirmed during enquiry.