Resources for Learning Gam

160 views
Skip to first unread message

David Muniz

unread,
Oct 17, 2013, 9:07:18 AM10/17/13
to google-ap...@googlegroups.com
Hi everyone!  

I'm a technology teacher at an international school using Google Apps for Education.  However, I don't teach programming, and have more of a background in content creation - music production, graphic design, etc.  So this command line stuff is a bit new to me, though as a kid, I got pretty good with DOS, back in the day.  So, it's not totally foreign, but it sure ain't Unix.  

Can someone please point me to resources for learning how to use GAM?  I'm hoping for a command reference sheet and help writing scripts for Mac Terminal. Also, instructions for setting up the CSV properly. I'm using GAM 2.5 now, but have downloaded 3 and will move to that eventually.  

What would be even cooler is a bunch of ready made scripts that I could modify for my needs.  

In particular, I want to 

bulk move existing users to existing OU's
bulk create groups and assign existing users to those groups
bulk create new users, assign them to an OU and several groups
bulk suspend users
bulk delete users

What we want to do is clean up our GAFE domain. Everyone is currently piled into one OU and management of groups has been left open to teachers. I want to separate the different age groups from the teachers, and be able to enable some services for teachers and not for students. I want to pull CSV data from our Student Information System, and create groups based on the classes the students are in, to make sharing and communication easy for teachers.  I want to create accounts for new incoming students and assign them to OU's and groups at the beginning of each school year. I want to suspend exiting/graduating students at the end of the school year for a period before deleting them.  

Thanks in advance for your help !


David


R2Carney

unread,
Oct 18, 2013, 3:39:01 PM10/18/13
to google-ap...@googlegroups.com
I can help you with the bulk suspend part because I just got done doing that for 500 old users.
 
It's very easy using GAM 3.1.
 
What I do is move the users that I want to suspend into an ou called "Inactive" then run the following command to pipe them to a  text file
gam info org inactive >> c:\inactive.txt
 
paste the users from your text file into a csv. Making sure cell one says email
 
then run the following command
 
gam csv c:\inactive.csv gam update user $email suspended on
 
That should suspend all users that were in your .csv.. I ran into an issue where some of the users errored out for an unknown reason so I ended up doing 100 users at a time instead of all 500 at once and it worked fine.
 
Hope that helps,
-Robin
Reply all
Reply to author
Forward
0 new messages