gam print users name ou > users.csv
primaryEmail,name.familyName,name.fullName,name.givenName,orgUnitPath
I'll assume that your school records CVS file school.csv has the headers:
FirstName,LastName,Organization
You're going to produce a new CSV file neworg.csv with these headers:
primaryEmail,orgUnitPath
Write a script that loops over school.csv, find the record in users.csv where name.FamilyName matches LastName and name.GivenName matches FirstName.
Write a record into neworg.csv with the primaryEmail value from users.csv and translate Organization from school.csv into the appropriate value for orgUnitPath.
gam csv neworg.csv gam update user ~primaryEmail ou ~orgUnitPath
Ross
--
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/0e7ea270-85da-4625-aad8-920ef4d5df50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Martin,This will take some work if your school records CSV file has only first and last names. Gam needs the user email address.gam print users name ou > users.csv
Produces a CSV file with these headers:primaryEmail,name.familyName,name.fullName,name.givenName,orgUnitPath
I'll assume that your school records CVS file school.csv has the headers:
FirstName,LastName,Organization
You're going to produce a new CSV file neworg.csv with these headers:
primaryEmail,orgUnitPath
Write a script that loops over school.csv, find the record in users.csv where name.FamilyName matches LastName and name.GivenName matches FirstName.
Write a record into neworg.csv with the primaryEmail value from users.csv and translate Organization from school.csv into the appropriate value for orgUnitPath.
gam csv neworg.csv gam update user ~primaryEmail ou ~orgUnitPath
Ross
On Mon, Jul 25, 2016 at 1:57 AM, Martin Vonášek <m...@levyuhel.com> wrote:
Hi,we started work with GAM and we have some questions:
- in our Googl Apps for Education we have many accounts (we created it before we started with GAM) and its very difficult to move for example 30 account to new org or groups. But we have csv file (from our school records) with these account (firstname, lastname) and we would like to use these csv for updating these accounts. So, for example, we create org a1620 and we need to fill these org with accounts which exists in our GAforEdu and we have csv file with first/lastname columns.
- where we have to put csv file when we want use it in GAM - in gam folder?
thanks a lot for your responds
--
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.
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/0e7ea270-85da-4625-aad8-920ef4d5df50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You're going to produce a new CSV file neworg.csv with these headers:
primaryEmail,orgUnitPath,Group
Add user to Org Unit:
gam csv neworg.csv gam update user ~primaryEmail ou ~orgUnitPath
(Alternative: gam csv neworg.csv gam update ou ~orgUnitPath add user ~primaryEmail)
Add user to Group:
gam csv neworg.csv gam update group ~Group add member user ~primaryEmail
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/0e7ea270-85da-4625-aad8-920ef4d5df50%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/ca58474a-39c1-4d81-a194-7db7f9e93ace%40googlegroups.com.
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.
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/0e7ea270-85da-4625-aad8-920ef4d5df50%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-manager+unsub...@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/ca58474a-39c1-4d81-a194-7db7f9e93ace%40googlegroups.com.