--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/06cd255a-51d1-4367-b9c7-47583c006350n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CA%2BVVBp-jenbSzPaeXvi3BaaP5_bR9fge8%2BF8BJccs4o2UQW01g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAAa2%2BOwtWUSH9kXwo5WNQKakRs%2BsNmJ%3Dq0et00Xa%2BWjnO4q4Sw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS-N7Avjv-JRoa2Mc4ViuD29D8TreYAA3%3Df_xCSTqTvyvg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/f9d1fdad-27a0-4386-ade8-f0cb1baa9189n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS9Ei-GygAfJD4Rd1N0o7kPq9_1EkBn%3Ds4eLg7p_H5jM3A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAAa2%2BOwYq8_1wdVh_2sVzWRa_VjgPCxxzeY2A7Ff55RtQjVhuQ%40mail.gmail.com.
First GAM command to get a list of all the open Google Classrooms:
gam print courses state active,provisioned > open-courses.csv
This command above will generate a csv file where you can get all the Google Classroom id's. You may have to open as a text file, delimited format comma and that first id column as text to see the numbers correctly but that is the only data you need out of the file. Or after you download the file, open a new fresh excel doc, do a DATA from TEXT import, select the file from above, then delimited, comma, next, text and finish to get it to show you that first id column and all the id numbers so you can copy and past them into another excel sheet I will explain below.
Now feed the edited, verified and saved file back into GAM for archiving:
Second GAM command that will archive all your Google Classrooms based on all the id's of the classrooms you save in a csv file:
gam csv classroomarchive.csv gam update course ~id state ARCHIVED
This command will archive the classrooms based on the id's you have in a CSV file. I created a .csv file with 1 header called id and I just paste all the ids from the other file into this file so it looks like this
id
53625426352
35156156846
This is the tricky part that is actually very easy:
The CSV file won't retain your format when you get it all setup the way you want, in my case 1 header called id and then long numbers below that header. So I would get it the way I needed it, save and close the file, run my command and it wouldn't work, said the data wasn't correct. To make this work, get the file all setup the way it needs to be, save the file leaving it open and then run the command GAM command that references that CSV that is open. It then worked with no issues for me. So getting the CSV setup the way I wanted, saving it and leaving it open kept it in the format where GAM could read it as well.