Creating groups from template group

209 views
Skip to first unread message

Rance Hall

unread,
Jun 15, 2023, 1:04:13 PM6/15/23
to GAM for G Suite

Hey all:

 

I ran this command:

 

gam loop ~/lists.csv gam create group ~~group~~ copyfrom te...@groups.esu10.org

 

My test group had some specific settings I was hoping would be copied into all the new groups, and they were NOT.

 

Now I need to try to script a bunch of changes to the newly created groups.

 

 

I now need to:

 

  1. Script an initial list of admins to help with a migration away from an existing list server
  2. Turn on external users
  3. Set the default sender to the group address
  4. Set the default reply to the group address
  5. Set misc privacy settings (who can post, etc)

 

 

Thoughts?

-- 

Rance Hall

ESU10 Network Services

rance...@esu10.org

308-698-1919

 

 

James SEYMOUR

unread,
Jun 15, 2023, 10:13:28 PM6/15/23
to GAM for Google Workspace
Hi Rance,

Have you tried to use the copyfrom in an update command? Something like below? I have changed the loop to csv as I am not sure how loop affects things and you should only need a single ~ in the variable ~group.

gam csv ~/lists.csv gam update group ~group copyfrom te...@groups.esu10.org

James

Rance Hall

unread,
Jun 16, 2023, 9:05:24 AM6/16/23
to google-ap...@googlegroups.com

James:

 

I did eventually get it to work, the “problem” was that the template group had been deleted and recreated, so it didn’t have the settings I was expecting.

 

I updated it, then did the command with an update and it worked.

 

The difference between “gam csv” and “gam loop” is in the documentation and refers to the difference between parallel and serial processing of the csv file.  In some cases, the serial processing option “loop” is “safer” as it slows things down and api limits don’t get exceeded.

 

Secondly, some Linux and Mac shells (zfs, etc) give meaning to a single ~ so the ~~variable~~ format was introduced to get around this issue.

 

Rance

 

-- 

Rance Hall

ESU10 Network Services

rance...@esu10.org

308-698-1919

 

 

 

From: 'James SEYMOUR' via GAM for Google Workspace <google-ap...@googlegroups.com>
Date: Thursday, June 15, 2023 at 9:13 PM
To: GAM for Google Workspace <google-ap...@googlegroups.com>
Subject: [GAM] Re: Creating groups from template group

[EXTERNAL EMAIL]

--
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/a965d564-4af0-499c-85a3-6e25e5261dd5n%40googlegroups.com.

James SEYMOUR

unread,
Jun 18, 2023, 7:46:29 PM6/18/23
to GAM for Google Workspace
Hi Rance,

Thanks for the confirmation about 'loop'. It's the first time I have come across this option and worth knowing. And I had only ever seen ~~ used in queries, but good to know it can be used outside if the OS is giving issues. Cheers.

James

Reply all
Reply to author
Forward
0 new messages