GAM command to print email counts of a Specific Group

12 views
Skip to first unread message

Sandip Admin

unread,
Sep 26, 2025, 8:32:33 AM (24 hours ago) Sep 26
to GAM for Google Workspace
Hi Ross,

Need help with the GAM command for printing the count of all the messages sent to a specific group.

I have tried the below command but it is giving wrong email count :
gam all users print messages query 'list:<Group Email Address> newer_than:8d' countsonly

Please suggest a command for the same.

Thanks and Regards,

Ross Scroggs

unread,
Sep 26, 2025, 11:11:15 AM (21 hours ago) Sep 26
to google-ap...@googlegroups.com
You command will overcount because every message will be countec multiple times.

Try this for a couple of members of the group:
gam user groupm...@domain.com  print messages query 'list:<Group Email Address> newer_than:8d' countsonly includespamtrash
gam user groupm...@domain.com  print messages query 'list:<Group Email Address> newer_than:8d' countsonly includespamtrash

Ross

----
Ross Scroggs



--
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 visit https://groups.google.com/d/msgid/google-apps-manager/ae70cfc7-3661-4176-978d-3ffc9ccdb937n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages