GAM PRINT GROUP MEMBERS unusable due to carriage returns

1,106 views
Skip to first unread message

Tessa Thompson

unread,
Apr 28, 2015, 4:18:38 PM4/28/15
to google-ap...@googlegroups.com
When I run gam print groups name members > groups.csv, the csv output has line feed and carriage return after each member of the group.  If I open it directly in Excel, the members may show blank or just show one member.  If I open it in Notepad+, I can see the extra CR/LF after each member name, but there is no way for me to easily strip those, yet keep the CR/LF where needed.  Unless I manually go through every group members and strip this info, I can't use the output and I have over 100 groups.

I have a script that runs against a CSV of group names and a single cell full of group members to populate groups for a mail migration.  Is there a way to get gam print groups members to provide a good CSV?

Thank you!! 

Jay Lee

unread,
Apr 28, 2015, 4:23:42 PM4/28/15
to google-ap...@googlegroups.com
If you're looking to capture membership to a CSV, the better option would probably be:

gam print group-members

if you want to know the membership of only one group use:

gam print group-members group myg...@example.com


Jay Lee

--
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 http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9e66d477-99b1-426c-a94f-a4150f99b7b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Kolbe

unread,
Sep 11, 2015, 11:28:07 AM9/11/15
to Google Apps Manager
super helpful. thank you.
-peter


On Tuesday, April 28, 2015 at 4:23:42 PM UTC-4, Jay Lee wrote:
If you're looking to capture membership to a CSV, the better option would probably be:

gam print group-members

if you want to know the membership of only one group use:

gam print group-members group myg...@example.com


Jay Lee

On Tue, Apr 28, 2015 at 4:05 PM, KnowledgeHunter <tessa_t...@hotmail.com> wrote:
When I run gam print groups name members > groups.csv, the csv output has line feed and carriage return after each member of the group.  If I open it directly in Excel, the members may show blank or just show one member.  If I open it in Notepad+, I can see the extra CR/LF after each member name, but there is no way for me to easily strip those, yet keep the CR/LF where needed.  Unless I manually go through every group members and strip this info, I can't use the output and I have over 100 groups.

I have a script that runs against a CSV of group names and a single cell full of group members to populate groups for a mail migration.  Is there a way to get gam print groups members to provide a good CSV?

Thank you!! 

--
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-manager+unsub...@googlegroups.com.

Ross Scroggs

unread,
Sep 11, 2015, 2:43:34 PM9/11/15
to google-ap...@googlegroups.com
Peter,

gam print groups name members delimiter ',' > groups.csv

The delimiter ',' says to use comma instead of cr/lf to separate the group members.

Ross

On Fri, Sep 11, 2015 at 8:28 AM, Peter Kolbe <pko...@bhsec.bard.edu> wrote:
super helpful. thank you.
-peter

On Tuesday, April 28, 2015 at 4:23:42 PM UTC-4, Jay Lee wrote:
If you're looking to capture membership to a CSV, the better option would probably be:

gam print group-members

if you want to know the membership of only one group use:

gam print group-members group myg...@example.com


Jay Lee

On Tue, Apr 28, 2015 at 4:05 PM, KnowledgeHunter <tessa_t...@hotmail.com> wrote:
When I run gam print groups name members > groups.csv, the csv output has line feed and carriage return after each member of the group.  If I open it directly in Excel, the members may show blank or just show one member.  If I open it in Notepad+, I can see the extra CR/LF after each member name, but there is no way for me to easily strip those, yet keep the CR/LF where needed.  Unless I manually go through every group members and strip this info, I can't use the output and I have over 100 groups.

I have a script that runs against a CSV of group names and a single cell full of group members to populate groups for a mail migration.  Is there a way to get gam print groups members to provide a good CSV?

Thank you!! 

--
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.

--
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 http://groups.google.com/group/google-apps-manager.

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



--

Dani Ajon

unread,
Jul 25, 2016, 10:28:34 AM7/25/16
to Google Apps Manager
Is there a way to get the (list of users) membership of a group with display names and job titles? 
Thanks Daniel 


On Tuesday, April 28, 2015 at 4:23:42 PM UTC-4, Jay Lee wrote:
If you're looking to capture membership to a CSV, the better option would probably be:

gam print group-members

if you want to know the membership of only one group use:

gam print group-members group myg...@example.com


Jay Lee

On Tue, Apr 28, 2015 at 4:05 PM, KnowledgeHunter <tessa_t...@hotmail.com> wrote:
When I run gam print groups name members > groups.csv, the csv output has line feed and carriage return after each member of the group.  If I open it directly in Excel, the members may show blank or just show one member.  If I open it in Notepad+, I can see the extra CR/LF after each member name, but there is no way for me to easily strip those, yet keep the CR/LF where needed.  Unless I manually go through every group members and strip this info, I can't use the output and I have over 100 groups.

I have a script that runs against a CSV of group names and a single cell full of group members to populate groups for a mail migration.  Is there a way to get gam print groups members to provide a good CSV?

Thank you!! 

--
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-manager+unsub...@googlegroups.com.

Ross Scroggs

unread,
Jul 25, 2016, 8:26:57 PM7/25/16
to google-ap...@googlegroups.com
Dani,

Not directly.
gam print group-members > groupmembers.csv
This gives you a CSV file with these columns:

status,group,email,role,type,id


gam print users name > users.csv

This gives you a CSV file with these columns:

primaryEmail,name.familyName,name.fullName,name.givenName


For each row in groupmembers.csv use the value in the email column to find the row in users.csv with that value in the primaryEmail column; then get the name.* values.


Where is the job title you want defined?


Ross


On Mon, Jul 25, 2016 at 7:28 AM, Dani Ajon <da...@apslearns.org> wrote:
Is there a way to get the (list of users) membership of a group with display names and job titles? 
Thanks Daniel 


On Tuesday, April 28, 2015 at 4:23:42 PM UTC-4, Jay Lee wrote:
If you're looking to capture membership to a CSV, the better option would probably be:

gam print group-members

if you want to know the membership of only one group use:

gam print group-members group myg...@example.com


Jay Lee

On Tue, Apr 28, 2015 at 4:05 PM, KnowledgeHunter <tessa_t...@hotmail.com> wrote:
When I run gam print groups name members > groups.csv, the csv output has line feed and carriage return after each member of the group.  If I open it directly in Excel, the members may show blank or just show one member.  If I open it in Notepad+, I can see the extra CR/LF after each member name, but there is no way for me to easily strip those, yet keep the CR/LF where needed.  Unless I manually go through every group members and strip this info, I can't use the output and I have over 100 groups.

I have a script that runs against a CSV of group names and a single cell full of group members to populate groups for a mail migration.  Is there a way to get gam print groups members to provide a good CSV?

Thank you!! 

--
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.

--
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.

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



--
Reply all
Reply to author
Forward
0 new messages