print delimiter param being disregarded

33 views
Skip to first unread message

Mike McLoughlin

unread,
Nov 6, 2025, 6:49:12 AM (yesterday) Nov 6
to GAM for Google Workspace
Hi 

I have historically used GAM and GAMADV side by side for slightly different tasks - one being the "print...fields" feature, coupled with the GAMCONFIG file enforcing the needed custom delimiter.

Now, with the release of GAM7, the GAMCONFIG file has been replaced by the new install so I am looking to use the print delimiter parameter like this:

print users fields primaryEmail,id,firstname,lastname,lastlogintime,ou,suspended  delimiter ~ > output.txt

However, the tilde delimiter is being disregarded in the output.txt, having no effect in the output file

Is there a way around this - eg having a 2nd config file location for GAMADV or another way? It possibly might be more sensible to have only GAM7 installed, of course.

Kind regards

- Mike

<Character>

Ross Scroggs

unread,
Nov 6, 2025, 10:50:14 AM (yesterday) Nov 6
to google-ap...@googlegroups.com
See: https://github.com/GAM-team/GAM/wiki/Users#display-information-about-users

By default, the entries in lists of groups and licenses are separated by the csv_output_field_delimiter from gam.cfg.

  • delimiter <Character> - Separate list items with <Character>
Put the ~ in quotes.
gam print users fields primaryEmail,id,firstname,lastname,lastlogintime,ou,suspended  delimiter "~" > output.txt

None of the fields you are printing are lists so the ~ will never be used.

What are you trying to achieve?

Ross
----
Ross Scroggs



--
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 visit https://groups.google.com/d/msgid/google-apps-manager/397d774e-1a1e-41f5-a2ce-9e7bbd441080n%40googlegroups.com.

Mike McLoughlin

unread,
Nov 6, 2025, 11:11:43 AM (yesterday) Nov 6
to GAM for Google Workspace
Hi Ross

Apologies for not being clearer.

I am trying to have the output tilde-separated rather than comma-separated. As I say, this is possible in the config file but I now need to include the requirement in the command itself, if possible.

Kind regards

- Mike

Ross Scroggs

unread,
Nov 6, 2025, 11:48:08 AM (yesterday) Nov 6
to google-ap...@googlegroups.com
See: https://github.com/GAM-team/GAM/wiki/Meta-Commands-and-File-Redirection#file-redirection

gam redirect csv ./output.txt columndelimiter "~" print users fields primaryEmail,id,firstname,lastname,lastlogintime,ou,suspended

Ross
----
Ross Scroggs


Maj. Marshall Giguere

unread,
Nov 6, 2025, 4:40:26 PM (yesterday) Nov 6
to google-ap...@googlegroups.com

Ross Scroggs

unread,
Nov 6, 2025, 4:48:40 PM (yesterday) Nov 6
to google-ap...@googlegroups.com
For output see: https://github.com/GAM-team/GAM/wiki/Meta-Commands-and-File-Redirection#file-redirection

Marsh's reply covers the case when you want to read a CSV file with an alternate column delimiter.

Ross
----
Ross Scroggs



On Nov 6, 2025, at 1:39 PM, Maj. Marshall Giguere <mgig...@nhwg.cap.gov> wrote:

Ross Scroggs

unread,
Nov 6, 2025, 5:35:11 PM (yesterday) Nov 6
to google-ap...@googlegroups.com
Mike,

Marsh and I are curious, what are you feeding the data to that wants a ~ as a column deliomiter?

Ross
----
Ross Scroggs


On Nov 6, 2025, at 1:39 PM, Maj. Marshall Giguere <mgig...@nhwg.cap.gov> wrote:

Mike McLoughlin

unread,
1:07 AM (20 hours ago) 1:07 AM
to GAM for Google Workspace
Hi Ross

The data feeds into an SQL OPENROWSET BULK script:

x.png
The tilde is needed as some columns contain commas in the text.

The scripts take a while to run and first attempt produced empty files but I am in the process of rerunning to double check.

These are the (slightly truncated) commands, by the way: 
y.png

I shall let you know if the 2nd attempt works.

Thanks in advance :-)

- Mike

Mike McLoughlin

unread,
2:04 AM (19 hours ago) 2:04 AM
to GAM for Google Workspace
Hi Ross & Marsh

I can confirm the suggestions worked fine the 2nd time. 

Many thanks for you help.

Kind regards

- Mike

Reply all
Reply to author
Forward
0 new messages