GAMADV-X - Column headers repeated in 'print user select...'

534 views
Skip to first unread message

PeterA

unread,
May 30, 2018, 9:15:14 AM5/30/18
to GAM for G Suite
GAMADV-X: 4.56.11
GAM: 4.40
Windows 7

When running:

./gam csv 'CSV read path' gam print user select ~Username fields firstname lastname > output.csv

Every result is printed on a separate line, but with column headers in between each result.

Is this by design? If so, how can I force the output to only include one row of headers, with the results below from there on?

Ross Scroggs

unread,
May 30, 2018, 9:18:33 AM5/30/18
to google-ap...@googlegroups.com
Peter,


./gam redirect csv ./output.csv multiprocess csv 'CSV read path' gam print user select ~Username fields firstname lastname

Ross

The contents of this message and any attachments to it are private, confidential and may be the subject of legal privilege. Telegraph Media Group Limited is registered in England and Wales (company number 451593) at 111 Buckingham Palace Road, London, SW1W 0DT. If you are not the intended recipient of this email please inform us and the sender immediately. You must not take any action based upon the contents of this email, nor copy it or show it to anyone. Any unauthorised disclosure, use or dissemination of the whole or part of the message contained in such email is prohibited. Any views or opinions expressed do not necessarily represent those of Telegraph Media Group Limited. It is the recipient’s responsibility to carry out any virus checking.



--
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/6ff1dcdb-f7fb-42d5-8a44-bf0d5bafa606%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PeterA

unread,
May 30, 2018, 9:30:00 AM5/30/18
to GAM for G Suite
Thanks very much for the swift response Ross. First day using GAMADV-X and can already see it's benefits.
If only vendors/tools we paid for were this prompt..

To give some context, I had a need to output the first and lastnames of group members into individual columns.
So initially I'm running:

./gam print group-members group groupa...@domain.com membernames > csvpath.csv

Followed by your command:

./gam redirect csv ./outputfinal.csv multiprocess csv 'csvpath.csv' gam print user select ~Username fields firstname lastname

Highly likely I'll pull other user data too, but first and lastnames for now.

Hope that helps someone!


On Wednesday, 30 May 2018 14:18:33 UTC+1, Ross Scroggs wrote:
Peter,


./gam redirect csv ./output.csv multiprocess csv 'CSV read path' gam print user select ~Username fields firstname lastname

Ross

On May 30, 2018, at 6:15 AM, PeterA <peter....@telegraph.co.uk> wrote:

GAMADV-X: 4.56.11
GAM: 4.40
Windows 7

When running:

./gam csv 'CSV read path' gam print user select ~Username fields firstname lastname > output.csv

Every result is printed on a separate line, but with column headers in between each result.

Is this by design? If so, how can I force the output to only include one row of headers, with the results below from there on?





The contents of this message and any attachments to it are private, confidential and may be the subject of legal privilege. Telegraph Media Group Limited is registered in England and Wales (company number 451593) at 111 Buckingham Palace Road, London, SW1W 0DT. If you are not the intended recipient of this email please inform us and the sender immediately. You must not take any action based upon the contents of this email, nor copy it or show it to anyone. Any unauthorised disclosure, use or dissemination of the whole or part of the message contained in such email is prohibited. Any views or opinions expressed do not necessarily represent those of Telegraph Media Group Limited. It is the recipient’s responsibility to carry out any virus checking.



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

Ross Scroggs

unread,
May 30, 2018, 9:37:46 AM5/30/18
to google-ap...@googlegroups.com
Peter,

./gam redirect outputfinal.csv print group-members group groupa...@domain.com userfields firstname,lastname

Ross


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.

PeterA

unread,
May 30, 2018, 10:00:49 AM5/30/18
to GAM for G Suite
Powershell: Invalid argument on lastname?
CMD: Completes, but can't see outputfinal.csv anywhere at all?

Any pointers?
Peter,

PeterA

unread,
May 30, 2018, 10:02:50 AM5/30/18
to GAM for G Suite
Sorry, it's ended up in 'Downloads' weirdly..

PowerShell error still stands though. It doesn't like 'lastname', whether comma or space separated.

Ross Scroggs

unread,
May 30, 2018, 10:43:32 AM5/30/18
to google-ap...@googlegroups.com
Peter,

If you don't give an absolute file path, files are put in the folder specified by drive_dir in gam.cfg.
This will put the file in your current working directory.

./gam redirect ./outputfinal.csv print group-members group groupa...@domain.com userfields firstname,lastname

Ross

Peter,

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.




The contents of this message and any attachments to it are private, confidential and may be the subject of legal privilege. Telegraph Media Group Limited is registered in England and Wales (company number 451593) at 111 Buckingham Palace Road, London, SW1W 0DT. If you are not the intended recipient of this email please inform us and the sender immediately. You must not take any action based upon the contents of this email, nor copy it or show it to anyone. Any unauthorised disclosure, use or dissemination of the whole or part of the message contained in such email is prohibited. Any views or opinions expressed do not necessarily represent those of Telegraph Media Group Limited. It is the recipient’s responsibility to carry out any virus checking.



--
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.
The contents of this message and any attachments to it are private, confidential and may be the subject of legal privilege. Telegraph Media Group Limited is registered in England and Wales (company number 451593) at 111 Buckingham Palace Road, London, SW1W 0DT. If you are not the intended recipient of this email please inform us and the sender immediately. You must not take any action based upon the contents of this email, nor copy it or show it to anyone. Any unauthorised disclosure, use or dissemination of the whole or part of the message contained in such email is prohibited. Any views or opinions expressed do not necessarily represent those of Telegraph Media Group Limited. It is the recipient’s responsibility to carry out any virus checking.


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


--
Reply all
Reply to author
Forward
0 new messages