I am writing a script (and by the way not very good with scripts) to
create new users in bulk. The spreadsheet refereenced in the code
below is valid and in the right place. the error I am getting is:
Line 6 Car 5 Invalid syntax Code 800401E4 Source (null)
I have no Idea where the error is, this is the code:
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
("C:\New_users.xls")
intRow = 2
Do Until objExcel.Cells(intRow,1).Value = ""
Set objOU = GetObject("ou=Phil, dc=fnfglobal, dc=local")
Set objUser = objOU.Create _
("User", "cn=" & objExcel.Cells(intRow, 15).Value)
objUser.sAMAccountName = objExcel.Cells(intRow, 16).Value
objUser.GivenName = objExcel.Cells(intRow, 10).Value
objUser.SN = objExcel.Cells(intRow, 12).Value
objUser.middleName = objExcel.Cells(intRow, 11).Value
objUser.company = objExcel.Cells(intRow, 1).Value
objUser.street = objExcel.Cells(intRow, 2).Value
'Enter City
objUser.l = objExcel.Cells(intRow, 4).Value
'Enter State
objUser.st = objExcel.Cells(intRow, 5).Value
objUser.postalCode = objExcel.Cells(intRow, 6).Value
objUser.department = objExcel.Cells(intRow, 14).Value
objUser.title = objExcel.Cells(intRow, 13).Value
objUser.AccountDisabled = FALSE
objUser.SetInfo
intRow = intRow + 1
Loop
objExcel.Quit
Any help would really be appreciated....
Phil