GAM is a command line tool that allows administrators to manage many aspects of their Google Apps Account.
Details here: https://github.com/jay0lee/GAM/wiki
Setting up GAM
Many steps to this process, it was setup and working for Izzy in late 2015
See directions here: https://github.com/jay0lee/GAM/wiki
Enable APIs (already done in 2015 & 2018) and create your client_secrets.json file: https://github.com/jay0lee/GAM/wiki/CreatingClientSecretsFile
My GAM folder is savd to Google here: https://drive.google.com/drive/u/1/folders/1LnVxfPtFAYoHefDycWYiW_LLQpFTY77c
Export All Groups to a file
gam print groups name description admin created id aliases members owners managers settings > groups.csv
Disabling All users in a file
Create text file with one user's email address, to be disabled, on each line
Goto the folder where you have GAM setup
Run this command:
FOR /F "tokens=*" %%A in (Users.txt) do gam update user %%A suspended on
To Add all users in a file to the Ignition group:
After the accounts for the previous year have been disabled the Spark & Ignition groups should be "Reset" by removing all current members and then re-adding only those that are listed a Spark or Ignition (Ignition, Mission Control, or Ground Control) member in http://apourl.co/Users.
Remove all current users 1st, using the GUI https://admin.google.com/apogaea.com/AdminHome?hl=en&groupIdfirstname.lastname@example.org
This could be done with GAM but I haven't researched how to remove all members yet.
Using the GUI you can select only one page of users at a time to remove, so may have to repeat the removal process a few times.
For /F "tokens=*" %%A in (Ignition.txt) do gam update group Ignition@apogaea.com add %%A
Exporting\Printing all users
gam print users allfields > users.csv
gam print groups name description admincreated id aliases members owners managers settings > groups.csv