Classroom - find Active Classrooms with Deactivated Teachers?

336 views
Skip to first unread message

Eric Feldman

unread,
Aug 15, 2023, 1:54:57 PM8/15/23
to GAM for Google Workspace
I'm needing to find a way to search all Active Classrooms and output a list where the Primary Teacher is a deactivated account.  Trying to Archive leftover Classrooms from previous school years.

I can get GAM to find all Active Classrooms and output the Teachers.
I can get GAM to find all deactivated users under the Staff OU (or our Inactive "parking" OU)

Is there a way to do this as a one-liner?  Or do I just need to do data-matching outside of GAM to generate the list??

Thanks.

Eric Feldman
Prosper ISD


Eric Feldman

unread,
Aug 15, 2023, 2:09:17 PM8/15/23
to GAM for Google Workspace
Well, this was as far as I got on a combined attempt, but it's generating one Drive file for each suspended Staff account.  I think I am missing something?

gam ou_and_children /Inactives/Staff print suspended todrive | gam csv - gam print courses teacher ~Email states active,provisioned fields name,coursestate todrive

Any insights or direction appreciated!

Eric

Ross Scroggs

unread,
Aug 15, 2023, 2:43:30 PM8/15/23
to google-ap...@googlegroups.com
Eric,

Assuming that you have Advanced GAM, the following will give you one file
gam ou_and_children /Inactives/Staff print users primaryemail | gam redirect csv - multiprocess todrive csv - gam print courses teacher "~primaryEmail" states active,provisioned fields name,coursestate

Ross

--
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/0cc15c6b-103e-4c49-9b37-885bbe9bf34cn%40googlegroups.com.


--

Eric Feldman

unread,
Aug 15, 2023, 2:50:12 PM8/15/23
to GAM for Google Workspace
Thanks Ross!  Much appreciated.
Reply all
Reply to author
Forward
0 new messages