move bulk user to a different OU

2,889 views
Skip to first unread message

SHAN

unread,
Nov 18, 2015, 8:30:03 AM11/18/15
to Google Apps Manager

i have been hitting my head past two days to bulk add user in an OU(Google apps) i could i am using the following script in GAM cmd line:
gam csv test.csv gam create user ~Email Address firstname ~First Name
lastname ~Last Name password ~Password

everytime throws same error file not found i made sure i have saved the file in the GAM foler c drive.

Finally i uploaded the csv in the primary OU, now my customer wants to move those user uploaded around 800 move to a different OU.

Ross Scroggs

unread,
Nov 18, 2015, 9:45:12 AM11/18/15
to google-ap...@googlegroups.com
The actual error message would be helpful but the following is probably the problem.
You entered: gam csv test.csv gam create user ~Email Address firstname ~First Name lastname ~Last Name password ~Password
The spaces in the column names cause the command to be incorrectly parsed.
Try: gam csv test.csv gam create user "~Email Address" firstname "~First Name" lastname "~Last Name" password ~Password

If you've already uploaded the users:
Try: gam csv test.csv gam update org <OrgUnitPath> add user "~Email Address"

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 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/0ef6f6f5-db98-41f2-9f22-86b8bb61075a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SHAN

unread,
Nov 18, 2015, 12:49:12 PM11/18/15
to Google Apps Manager
Ross,
Thanks a lot for your help, it worked :) yes i was making that spacing error.
Thanks alot again for your help.


On Wednesday, November 18, 2015 at 8:15:12 PM UTC+5:30, Ross Scroggs wrote:
The actual error message would be helpful but the following is probably the problem.
You entered: gam csv test.csv gam create user ~Email Address firstname ~First Name lastname ~Last Name password ~Password
The spaces in the column names cause the command to be incorrectly parsed.
Try: gam csv test.csv gam create user "~Email Address" firstname "~First Name" lastname "~Last Name" password ~Password

If you've already uploaded the users:
Try: gam csv test.csv gam update org <OrgUnitPath> add user "~Email Address"

Ross

On Nov 18, 2015, at 5:29 AM, SHAN <shan...@ialpha.in> wrote:


i have been hitting my head past two days to bulk add user in an OU(Google apps) i could i am using the following script in GAM cmd line:
gam csv test.csv gam create user ~Email Address firstname ~First Name
lastname ~Last Name password ~Password

everytime throws same error file not found i made sure i have saved the file in the GAM foler c drive.

Finally i uploaded the csv in the primary OU, now my customer wants to move those user uploaded around 800 move to a different OU.

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

SHAN

unread,
Nov 19, 2015, 6:43:18 AM11/19/15
to Google Apps Manager
Hi Ross,
It keeps throwing the below mentioned error, i made sure that the file i kept on the GAM folder:

Traceback (most recent call last):                           
File "<string>", line 8646, in <module>                 
 IOError: [Errno 2] No such file or directory: u'test.csv'  

Any help please?

On Wednesday, November 18, 2015 at 8:15:12 PM UTC+5:30, Ross Scroggs wrote:
The actual error message would be helpful but the following is probably the problem.
You entered: gam csv test.csv gam create user ~Email Address firstname ~First Name lastname ~Last Name password ~Password
The spaces in the column names cause the command to be incorrectly parsed.
Try: gam csv test.csv gam create user "~Email Address" firstname "~First Name" lastname "~Last Name" password ~Password

If you've already uploaded the users:
Try: gam csv test.csv gam update org <OrgUnitPath> add user "~Email Address"

Ross

On Nov 18, 2015, at 5:29 AM, SHAN <shan...@ialpha.in> wrote:


i have been hitting my head past two days to bulk add user in an OU(Google apps) i could i am using the following script in GAM cmd line:
gam csv test.csv gam create user ~Email Address firstname ~First Name
lastname ~Last Name password ~Password

everytime throws same error file not found i made sure i have saved the file in the GAM foler c drive.

Finally i uploaded the csv in the primary OU, now my customer wants to move those user uploaded around 800 move to a different OU.

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

Sai Paruchuri

unread,
Nov 19, 2015, 7:46:42 AM11/19/15
to Google Apps Manager
Hi Shan ,

Since you have already created users make a csv file with the list of users, save it in gam folder and run below command. Hope this helps.

You can find more stuff here

Make a csv file with 2,3 users and try using this cmd line if worked you can go with all users.

gam update org orgname add file file.txt

Ross Scroggs

unread,
Nov 19, 2015, 9:08:15 AM11/19/15
to google-ap...@googlegroups.com
Copy the actual command that you are using and send it here.

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.

Shantanu Das

unread,
Nov 19, 2015, 9:14:32 AM11/19/15
to google-ap...@googlegroups.com
These are the commands,

gam csv test.csv gam update org <OrgUnitPath> add user "~Email Address

gam csv test.csv gam create user "~Email Address" firstname "~First Name" lastname "~Last Name" password "~Password"

error:
            
Traceback (most recent call last):                        
File "<string>", line 8646, in <module>                
IOError: [Errno 2] No such file or directory: u'test.csv'  



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/0ef6f6f5-db98-41f2-9f22-86b8bb61075a%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.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Manager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/uQ0THBpxLSw/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Ross Scroggs

unread,
Nov 19, 2015, 9:33:16 AM11/19/15
to google-ap...@googlegroups.com
Here's what I need:
c:\gam-64>dir
 Volume in drive C has no label.
 Volume Serial Number is 663F-DA8B

 Directory of c:\gam-64

11/19/2015  06:31 AM    <DIR>          .
11/19/2015  06:31 AM    <DIR>          ..
08/24/2015  07:51 AM            13,273 admin-settings-v1.json
10/26/2015  02:42 PM               397 client_secrets.json
08/24/2015  07:51 AM            10,133 cloudprint-v2.json
11/16/2015  04:13 PM         7,634,532 gam.exe
11/19/2015  06:30 AM    <DIR>          gamcache
11/19/2015  06:22 AM                10 lastupdatecheck.txt
08/24/2015  07:51 AM            25,852 LICENSE
11/19/2015  06:30 AM             2,130 oauth2.txt
10/27/2015  10:56 AM             2,036 oauth2service.json
11/19/2015  06:31 AM                39 test.csv
08/24/2015  07:51 AM            19,110 whatsnew.txt
              10 File(s)      7,707,512 bytes
               3 Dir(s)  414,969,782,272 bytes free

c:\gam-64>gam csv test.csv gam info user "~Email Address" nolicenses
starting 5 worker threads...
First Name: Tëst
Last Name: User1
Is a Super Admin: False
...


Shantanu Das

unread,
Nov 19, 2015, 9:56:12 AM11/19/15
to google-ap...@googlegroups.com
Hi Ross,
Ran the following command still the same issue
C:\gam>gam csv test.csv gam info user"~Email Address" nolicenses    Traceback (most recent call last):                                    File "<string>", line 8646, in <module>                           IOError: [Errno 2] No such file or directory: u'test.csv'           

Ross Scroggs

unread,
Nov 19, 2015, 10:18:26 AM11/19/15
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages