How to print users of an OU?

3,418 views
Skip to first unread message

Jorge Valbuena Prieto

unread,
May 17, 2021, 11:41:47 AM5/17/21
to GAM for Google Workspace
I am trying to print all users in an organization. I follow the command: 

gam print users [allfields] [custom all|list,of,schemas] [userview] [ims] [emails] [externalids] [relations] [addresses] [organizations] [phones] [licenses] [firstname] [lastname] [emailparts] [deleted_only] [orderby email|firstname|lastname] [ascending|descending] [domain] [query <query>] [fullname] [ou] [suspended] [changepassword] [agreed2terms] [admin] [gal] [id] [creationtime] [lastlogintime] [aliases] [groups] [todrive]

gam print users [OU1/OU123] todrive
or 
gam print user ou "OUexample/OUexample"

I use the following command for it. What am I doing wrong? 

Is there an option to send it to a specific folder on My Google Drive? Can you force the name with which the document is generated?


Thanks for ur help. Good day. 




Ross Scroggs

unread,
May 17, 2021, 12:12:01 PM5/17/21
to google-ap...@googlegroups.com
Jorge,

What version of GAM are you using?

This command will list all users in the OU /Path/To/OU and its sub OUs.

gam print users query "orgUnitPath='/Path/To/OU'" todrive

With Standard GAM you can not choose the folder or name; with Advanced GAM you can.

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/d359b562-44b2-4e8b-ac2a-0d3458ad9c2fn%40googlegroups.com.


--

Ryan Adams Admin

unread,
Oct 14, 2021, 4:20:06 PM10/14/21
to GAM for Google Workspace
Hi Ross,

Let's say there are users in /Path, /To, and /OU, and you wanted to print all of the users in those three OU's into one export. How would one go about doing that? Would it just be gam print users query "orgUnitPath='/Path/" ? How would one go about doing the same thing for Chromebooks that might be sorted via multiple OU's under one larger parent OU?

Thanks!

Ross Scroggs

unread,
Oct 14, 2021, 4:26:26 PM10/14/21
to google-ap...@googlegroups.com

Ryan Adams Admin

unread,
Oct 14, 2021, 4:32:00 PM10/14/21
to GAM for Google Workspace
Thanks...is this applicable to CrOS devices as well? We recently learned that students were getting around our Securly content filtering by disabling certificates found in chrome://settings/certificates. We were able to block access to that settings page, but the only way we're able to undo what they did is via clearing user profiles. We have 13K+ devices, so I'm trying to find the best way to (in stages, by each school) send the clear users command to all chromebooks within an OU...but that OU has many sub OU's since we organize our devices by their cart assignment. Any help would be greatly appreciated.

Ryan Adams Admin

unread,
Oct 14, 2021, 4:33:05 PM10/14/21
to GAM for Google Workspace

Ross Scroggs

unread,
Oct 14, 2021, 4:46:51 PM10/14/21
to google-ap...@googlegroups.com
Ryan,

You can say ous, ous_and_children, cros_ous, cros_ous_and_children as required.

Ross



--
Reply all
Reply to author
Forward
0 new messages