--
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/f0718674-a72a-4b20-b973-38bf43103ce4n%40googlegroups.com.
Thanks Ross- It appears to run, but the CSV is empty. I’ve tried to run the command with the CSV file open and with it closed. There are 8 members in the group. I’m running an old version 5.35.03 could that be an issue?
Jeff Sararas | Data and Technology Specialist
TAG Hardware
T: (604)542.4888 (ext 115)
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OzYAnjzhwl0/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAJkvRS_5Xv6EjF0tpmRdZOnp%3DN96WTP2q4Te_6QLh796BLAs2A%40mail.gmail.com.
Thanks a lot Chris!
Jeff
From: google-ap...@googlegroups.com <google-ap...@googlegroups.com> On Behalf Of Chris River
Sent: September 8, 2021 12:44 PM
To: GAM for Google Workspace <google-ap...@googlegroups.com>
Subject: Re: [GAM] Duplicate a group with along with all members
Updating GAM might help. I think I've seen that issue before, but I could easily be misremembering.
If you'd like a one-liner to do this for a single group, this should get you there (replace sourcegroup@domain and newgroup@domain with your source and destination groups' names):
gam print group-members group sourcegroup@domain | ConvertFrom-Csv | select *,@{n="destgroup";e={"newgroup@domain"}} | ConvertTo-Csv | gam redirect csv ./NewGroupUpdates.csv append update group csvkmd - keyfield destgroup subkeyfield role datafield email sync preview actioncsv csvdata email
That will just generate a preview CSV of the changes that GAM would make, so you can verify before running. Just remove "preview" from that command to have it actually perform the sync.
This does the same thing as Ross' command, except that it creates a new column with the new group name for you (without requiring manual CSV editing), and it uses the very handy "actioncsv" parameter to output the results of the command to csv format for easier review. csvkmd only operates single-threaded (unless Ross has a way to multithread it that I haven't worked out yet), but of course that's not an issue for only 8 members.
On Wednesday, September 8, 2021 at 12:51:36 PM UTC-4 Jeff wrote:
Thanks Ross- It appears to run, but the CSV is empty. I’ve tried to run the command with the CSV file open and with it closed. There are 8 members in the group. I’m running an old version 5.35.03 could that be an issue?
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/131a1884-8d51-4988-a958-0614fa89bc40n%40googlegroups.com.