Is there a way to remove all members of a group using GAM? I'm building a solution to re-fresh a series of groups from an external database. Rather than retrieve all the existing members, then send individual commands to remove each of them, then add all the new members, I was hoping I could send a single command to remove all existing members. Is this possible?
Steve
--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to
google-apps-man...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager
Is there a way to remove all members of a group using GAM? I'm building a solution to re-fresh a series of groups from an external database. Rather than retrieve all the existing members, then send individual commands to remove each of them, then add all the new members, I was hoping I could send a single command to remove all existing members. Is this possible?
Steve
--
--
You can use a simple bash loop:
for u in `gam info group YOURGROUP | egrep "Member|Owner" | cut -d: -f2` ; do echo "removing $u" ; gam update group YOURGROUP delete $u ;done
Moti
On Tue, Sep 13, 2011 at 10:49 AM, Steve Hall <steve...@tyngsboroughps.org> wrote:
I should have said "This is my existing strategy, but I would still prefer to remove all members in one operation then send the add commands." With the existing strategy, I have to script the retrieval of existing names, parse the results, then do the adds...it's just more work. There are times when I just want to wipe out all the members.
SteveOn Tue, Sep 13, 2011 at 10:35 AM, Steve Hall <steve...@tyngsboroughps.org> wrote:
This is my existing strategy.
--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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/614aa280-b123-41ce-8e12-750fa4b70f14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
OR
--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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/614aa280-b123-41ce-8e12-750fa4b70f14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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/33c4b109-cfbd-48b0-b49c-8dc9d74cbfbe%40googlegroups.com.
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/5a1e16dd-699c-45a4-86d8-df0ca3075d97n%40googlegroups.com.