GAM and Commands to Remember

Reminders about using GAM for Google Admin

I've been working with Google Admin for a while, but when it comes to organising users at the beginning of the year, I keep loosing the details that I need to complete the tasks. So I'm putting details into this post about what commands I need to remember and the steps for this.

Print out all users in an organisation

This command will print all of the details of users in your domain. This will give me their account and most importantly, their organisation unit.

gam print users allfields > users.csv

Changing users to other organisational units

This command will allow me to use a text file I've created from the download of all the user details to move users from OUs to elsewhere. The text file only needs the first part of the email address, minus "@blah.com"

gam file users.txt update user org "/Users/Leaving"

Bulk upload of new users

To do this, I need to get the list of the new users with the following details and column headings:

Email, FirstName, LastName, OrgUnit, Password

And add them to a CSV file. Once completed, the command is:

gam csv users.csv gam create user "~Email" firstname "~FirstName" lastname "~LastName" org "~OrgUnit" password "~Password" changepassword on


Password reset and force change password


gam csv pass.csv gam update user ~Email password ~Password changepassword on

GAM Cheat Sheet
https://gamcheatsheet.com/GAM%20Cheat%20Sheet%20A3.pdf

Comments

Popular posts from this blog

Configuring Allied Telesis Switches with PuTTy

FASTER - Arma 3 Server Manager (#Arma3_DIYDGS) Part 1

#DIYDGS - The Basics - Learning Steam_CMD