Group Sync

114 views
Skip to first unread message

Alex Busby

unread,
May 31, 2018, 8:14:09 PM5/31/18
to GAM for G Suite
Is there a way to Sync the same group with multiple OUs?  I have 2 OUs that need to sync with a particular group and can't seem to figure out how without having to move the OUs around.  

Ross Scroggs

unread,
May 31, 2018, 8:41:47 PM5/31/18
to google-ap...@googlegroups.com
Alex,

With Gam 4.40 you'd do something like this:

gam ou "/Students/Lower School/2021" print > tykes.lst

gam ou "/Students/Lower School/2022" print >> tykes.lst

gam update group ty...@domain.com add member file tykes.lst


With my Advanced Gam (https://github.com/taers232c/GAMADV-X) or (https://github.com/taers232c/GAMADV-XTDyou'd do this:

gam update group ty...@domain.com add member ous "'/Students/Lower School/2021','/Students/Lower School/2022'"


Ross


On Thu, May 31, 2018 at 5:14 PM Alex Busby <a.t....@g.maranausd.org> wrote:
Is there a way to Sync the same group with multiple OUs?  I have 2 OUs that need to sync with a particular group and can't seem to figure out how without having to move the OUs around.  

--
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 post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/48a86a29-9955-4db1-bb25-db803c8ce74f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Ross Scroggs

unread,
May 31, 2018, 8:50:39 PM5/31/18
to google-ap...@googlegroups.com
Alex,

The "add member" in the examples should be "sync member"; I was using add/remove for testing.
Gam 4.40:

gam ou "/Students/Lower School/2021" print > tykes.lst

gam ou "/Students/Lower School/2022" print >> tykes.lst

gam update group ty...@domain.com sync member file tykes.lst

Advanced Gam:

gam update group ty...@domain.com sync member ous "'/Students/Lower School/2021','/Students/Lower School/2022'"


Ross

--

Alex Busby

unread,
Jun 1, 2018, 9:52:28 AM6/1/18
to GAM for G Suite
Awesome, thanks Ross!

Andrew Penner

unread,
Jun 1, 2018, 10:20:33 AM6/1/18
to google-ap...@googlegroups.com
Hey Ross:
Does "sync member" remove addresses that aren't on the .lst file?

______________________________________________________
Andrew Penner, Technical Analyst III (A+, MCP, MCDST)
Office: 780-460-3712 (333)
Mobile:780-913-7576
60 Sir Winston Churchill Ave
St. Albert, AB T8N 0G4




--
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 post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.



  Find us on Facebook:
  Follow us on Twitter: 

Ross Scroggs

unread,
Jun 1, 2018, 10:25:00 AM6/1/18
to google-ap...@googlegroups.com
Andrew,

Yes. sync does adds/removes as necessary to make the group members match the .lst file.

Andrew Penner

unread,
Jun 1, 2018, 10:47:03 AM6/1/18
to google-ap...@googlegroups.com
Sweet! I'll have to give this a try.

______________________________________________________
Andrew Penner, Technical Analyst III (A+, MCP, MCDST)
Office: 780-460-3712 (333)
Mobile:780-913-7576
60 Sir Winston Churchill Ave
St. Albert, AB T8N 0G4




For more options, visit https://groups.google.com/d/optout.

Avrohom Eliezer Friedman

unread,
Jun 1, 2018, 11:01:27 AM6/1/18
to google-ap...@googlegroups.com
A drop off topic - but is it possible a group sync off of a Google Sheet instead of a .lst file?


-----
Avrohom Eliezer Friedman
IT Director

Yeshiva Toras Chaim Toras Emes
305-944-5344 x222 (o)
305-494-2055 (cell)
aefri...@ytcteam.org


Ross Scroggs

unread,
Jun 1, 2018, 12:56:05 PM6/1/18
to google-ap...@googlegroups.com
Andrew,

No, you have to download the sheet first.

Gam 4.40:
gam user us...@domain.dom get drivefile drivefilename "NameOfSheet" format csv targetfolder ". or path"
The file will be named NameOfSheet.csv.
An existing file of the same name will not be overwritten, (#)- will be added as a prefix.
Advanced GAM:
gam user us...@domain.dom get drivefile drivefilename "NameOfSheet" format csv targetfolder ". or path" targetname "A Different Name.csv" overwrite
The file will be named NameOfSheet.csv unless you specify targetname " Different Name.csv".
An existing file of the same name will not be overwritten, (#)- will be added as a prefix unless you specify overwrite.

Ross



For more options, visit https://groups.google.com/d/optout.


--

Avrohom Eliezer Friedman

unread,
Jun 1, 2018, 2:32:19 PM6/1/18
to google-ap...@googlegroups.com
So if i specify overwrite then I can technically schedule it nightly to pull the sheet and then sync it and any edits done in the sheet will sync nightly - right?



-----
Avrohom Eliezer Friedman
IT Director

Yeshiva Toras Chaim Toras Emes
305-944-5344 x222 (o)
305-494-2055 (cell)
aefri...@ytcteam.org

Ross Scroggs

unread,
Jun 1, 2018, 2:57:36 PM6/1/18
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages