Using GAM
- gam print users allfields todrive (this downloads a csv to your drive of all of your users)
- Downloaded that CSV file.
- Opened in Filemaker Pro (or Excel) and find the users you want to unsuspend.
- Once you have the list of usernames use the formula in column B =CONCATENATE("gam update user ", A1, " suspended off")
- Copy column B into a CSV file and save it as a .bat file
- Put it in the GAM folder directory
- Run the bat file with gam batch myfile.bat
*Using the formula in step #4 just quickly made the following command: gam update user user1@isd271.org suspended off
I had to do this again today and I was able to get a much easier way to work! I followed directions on the same thread. I must not have been doing it right the first time.
Using GAM
- gam print users query orgUnitPath="/Student/HS/Kennedy/2014" | gam csv - gam update user ~Email suspended off
That's it! There are 2 commands going on, getting the list of users in that OU and then performing the action to unsuspend them all. Using the pipe ( | ) allows for 2 commands to be done on one line.
*I had to use ~Email and not ~PrimaryEmail (like it says in the thread)
Helpful links
Under GAM in 2017 the command would be gam ou "/Student/HS/Kennedy/2014" update user suspended on
ReplyDeleteHi. I would like to know what is the code for bulk suspension of google accounts using GAM?
ReplyDeleteThanks