Using bulk operations in same command as static

42 views
Skip to first unread message

Eric Krebill TCAS

unread,
Aug 17, 2017, 11:40:15 AM8/17/17
to GAM for G Suite
I have a command I'm trying to run and can't figure out the syntax.

Backstory:  I'm pulling specific data from Active Directory into a CSV file.  For the purposes of this discussion, just using the Email and Description fields.  What I need to do is craft a GAM command that will put the students in the right OU based on what is in the Description field.  The description field holds the graduation year (2018).  The OU is /Students/2018.  I need "/Students/" to be static and the grad year to be dynamic "~Description". How do I mix the 2?

I've tried several iterations of the following command without success.

gam csv studentlist.csv gam update org "/Students/"~Description add users ~Email

Any help is greatly appreciated.

Jay Lee

unread,
Aug 17, 2017, 11:42:56 AM8/17/17
to google-ap...@googlegroups.com
When GAM sees an argument named something like:

~Variable

it will replace the entire argument with the Variable column value from the CSV row.

~~Variable~~ is partial replacement. So if you used:

"/Students/~~Description~~"

it should work.

Jay

--
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.
To post to this group, send email to google-apps-manager@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/450122e4-0977-4ece-8b57-4e0663919ff1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Krebill TCAS

unread,
Aug 17, 2017, 12:48:14 PM8/17/17
to GAM for G Suite
Worked perfect.  Thanks Jay.


On Thursday, August 17, 2017 at 11:42:56 AM UTC-4, Jay Lee wrote:
When GAM sees an argument named something like:

~Variable

it will replace the entire argument with the Variable column value from the CSV row.

~~Variable~~ is partial replacement. So if you used:

"/Students/~~Description~~"

it should work.

Jay
On Thu, Aug 17, 2017 at 8:39 AM, Eric Krebill TCAS <ekre...@tricountyschools.com> wrote:
I have a command I'm trying to run and can't figure out the syntax.

Backstory:  I'm pulling specific data from Active Directory into a CSV file.  For the purposes of this discussion, just using the Email and Description fields.  What I need to do is craft a GAM command that will put the students in the right OU based on what is in the Description field.  The description field holds the graduation year (2018).  The OU is /Students/2018.  I need "/Students/" to be static and the grad year to be dynamic "~Description". How do I mix the 2?

I've tried several iterations of the following command without success.

gam csv studentlist.csv gam update org "/Students/"~Description add users ~Email

Any help is greatly appreciated.

--
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.
To post to this group, send email to google-ap...@googlegroups.com.

+KimNilsson

unread,
Aug 21, 2017, 8:11:41 AM8/21/17
to GAM for G Suite
I so would like to do this with GCDS, but can't (and pretty sure it's not possible, at least that's what their support last I asked)
Super cool when GAM does things other tools can't.

+KimNilsson

unread,
Aug 21, 2017, 8:12:29 AM8/21/17
to GAM for G Suite
Instead I had to create 51 separate rules and specify which department was mapped to which OU. :-/
Reply all
Reply to author
Forward
0 new messages