Gam Command Question

234 views
Skip to first unread message

Benjamin Wexler

unread,
May 3, 2024, 11:56:38 AM5/3/24
to GAM for Google Workspace
Is there a command to get a count of all users ( if possible total domain wide and then by OU)?

✉ Kevin Melillo

unread,
May 3, 2024, 12:12:35 PM5/3/24
to google-ap...@googlegroups.com
gam info domain lists the user count.  I don't believe there is a feature to count by OU though.
I would handle it by printing all users of an OU, then run a count on the number of lines in the file, and subtract 1 for the header.
In Linux it would be something like

wc -l filename.csv


On Fri, May 3, 2024 at 11:56 AM Benjamin Wexler <benjami...@gmail.com> wrote:
Is there a command to get a count of all users ( if possible total domain wide and then by OU)?

--
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/8e1d677d-af35-473c-bd24-a43293dc4918n%40googlegroups.com.

Ross Scroggs

unread,
May 3, 2024, 12:35:20 PM5/3/24
to google-ap...@googlegroups.com
This is the best Advnced GAM can do at the moment, I'll clean it up.

# Domain

gam print users showitemcountonly

# By OU

gam print ous showparent | gam redirect stdout ./OrgUnitUserCounts.txt multiprocess redirect stderr stdout csv - gam print users select ou "~orgUnitId" showitemcountonly


Ross

----
Ross Scroggs



On May 3, 2024, at 8:56 AM, Benjamin Wexler <benjami...@gmail.com> wrote:

Is there a command to get a count of all users ( if possible total domain wide and then by OU)?

Ross Scroggs

unread,
May 3, 2024, 9:29:09 PM5/3/24
to google-ap...@googlegroups.com
Benjamin,

Get Advanced GAM 6.75.04

gam print usercountsbyorgunit 

Ross
----
Ross Scroggs



On May 3, 2024, at 8:56 AM, Benjamin Wexler <benjami...@gmail.com> wrote:

Is there a command to get a count of all users ( if possible total domain wide and then by OU)?

Benjamin Wexler

unread,
May 5, 2024, 9:03:38 AM5/5/24
to GAM for Google Workspace

Thank you.. Once updated that command worked perfectly. Definitely works having it print out todrive
Reply all
Reply to author
Forward
0 new messages