GAM Groups - how to filter groups for specific names or ou's

938 views
Skip to first unread message

Michael Mauel

unread,
Jul 23, 2019, 4:01:50 AM7/23/19
to GAM for G Suite
Hello,
i am really new to GAM an this group, so i want to say hello to all here.

situation:
enterprise with lots of OUs , let's say for SWEDEN, GERMANY, ITALY etc.
All groups are in ONE place (can't be OU specific)
Group habe a kind of 'marker' - example   thisisagroupf...@domain.com --> so '-de@' is the 'marker'

i would like to list all group let's say for OU /Germany
How to get a list of all groups with the 'marker' "-de@" in email address

or
how to list all groups where a owner/manager/member is a user of OU /Germany

OR maybe our idea of such a kind of 'marker' is bad - is there a much better way to 'seperate' group to specific OU's / Countries ?


kr
Michael


Tommaso Matteo Bartoli

unread,
Jul 23, 2019, 6:18:16 AM7/23/19
to google-ap...@googlegroups.com
Hi Michael
I think you should print all groups to drive, and than filter all the groups that contains the suffix you want from the spreadsheet. 
The command you need is: 
gam print groups todrive

Bye


Tommaso Bartoli 
Deployment Specialist & Sysadmin - Operations - Noovle S.r.l.
________

https://www.noovle.com | The Nexus of forces



Es gelten die AGB der Artefact Germany GmbH (https://artefact.com/de/avb//) Gerichtsstand ist Duisburg.

Artefact Germany GmbH – Vertretungsberechtigte Geschäftsführer: Meike Specht, Julius Ewig und Jan Brockmann. Registergericht: Amtsgericht Duisburg – Registernummer: HRB 13954

Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz: DE 229 628 967

_______________________________

This email and any attachments contains privileged and confidential information intended only for the use of the addressee(s). If you are not an intended recipient of this email, you are hereby notified that any dissemination, copying or use of information is strictly prohibited. If you received this email in error or without authorization, please delete the e-mail from your system and notify us immediately by sending us an e-mail. If you need any further assistance, please send a message to hello-...@artefact.com.


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/b68361b9-99de-4e2e-b612-2a7efa35804a%40googlegroups.com.

Ross Scroggs

unread,
Jul 23, 2019, 8:56:59 AM7/23/19
to google-ap...@googlegroups.com

i would like to list all group let's say for OU /Germany
How to get a list of all groups with the 'marker' "-de@" in email address
gam print groups emailmatchpattern "^.*-de@.*$"

For your other reqquest, I have scripts that can help:

This scripts will work with Basic or Advanced GAM
See:
GetGroupsOwnedByUser.py
GetGroupsWithExternalMembers.py
GetGroupsWithMatchingMembers.py

Ross

Michael Mauel

unread,
Jul 23, 2019, 10:37:50 AM7/23/19
to GAM for G Suite
Great great help from you guys!

I switched to Advanced GAM and love it - it saves so much time here 'WOW'

But as a GAM beginner - hey Ross,  how can i run these great GAM scripts? 

kr
Michael


On Tuesday, 23 July 2019 10:01:50 UTC+2, Michael Mauel wrote:
Hello,
i am really new to GAM an this group, so i want to say hello to all here.

situation:
enterprise with lots of OUs , let's say for SWEDEN, GERMANY, ITALY etc.
All groups are in ONE place (can't be OU specific)
Group habe a kind of 'marker' - example   thisisagroupfromgermany-de@domain.com --> so '-de@' is the 'marker'

+KimNilsson

unread,
Jul 23, 2019, 10:48:49 AM7/23/19
to GAM for G Suite
Michael, what is your operating system?

The scripts are Python scripts, and as such need support for the right version of Python on your computer, and the instructions differ, depending on your OS.

Michael Mauel

unread,
Jul 24, 2019, 3:34:59 AM7/24/19
to GAM for G Suite
Thanks for all the kind help.

I talked with Ross, and me told me to install native python (from python.org) on my Windows 10 System, because Advanced GAM just installs an embedded python only.
After installation of python the scripts run like a charm...

@Ross: A small typo found on that one:

GetEmptyGroups.py - line 9
#  $ gam print groups memberscount manageracount ownerscount > ./GroupCounts.csv
shoud be
#  $ gam print groups memberscount managerscount ownerscount > ./GroupCounts.csv


kind regards
Michael


On Tuesday, 23 July 2019 10:01:50 UTC+2, Michael Mauel wrote:
Hello,
i am really new to GAM an this group, so i want to say hello to all here.

situation:
enterprise with lots of OUs , let's say for SWEDEN, GERMANY, ITALY etc.
All groups are in ONE place (can't be OU specific)
Group habe a kind of 'marker' - example   thisisagroupfromgermany-de@domain.com --> so '-de@' is the 'marker'
Reply all
Reply to author
Forward
0 new messages