Guest User

Untitled

a guest
Sep 9th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. Problem with my VBS
  2. Line: 6
  3. Char: 5
  4. Invalid Syntax
  5.  
  6. Set objExcel = CreateObject("Excel.Application")
  7. Set objWorkbook = objExcel.Workbooks.Open _
  8. ("C:Scriptt/Users.xls")
  9. intRow = 3
  10. Do Until objExcel.Cells(intRow,1).Value = ""
  11. Set objOU = GetObject("ou=REAL, dc=ormbunken, dc=com")
  12. Set objUser = objOU.Create _
  13. ("User", "cn=" & objExcel.Cells(intRow, 2).Value)
  14. objUser.sAMAccountName = objExcel.Cells(intRow, 1).Value
  15. objUser.SetPassword = objExcel.Cells(intRow, 5).Value
  16. objUser.GivenName = objExcel.Cells(intRow, 3).Value
  17. objUser.SN = objExcel.Cells(intRow, 4).Value
  18. objUser.AccountDisabled = FALSE
  19. objUser.SetInfo
  20. intRow = intRow + 1
  21. Loop
  22. objExcel.Quit
  23.  
  24. Set oOU = GetObject("LDAP://test.test.cz/ou=skup,dc=test,dc=test,dc=cz")
  25. Set oUser = oOU.Create("User", "cn=" & "Test" & " " & "Tester")
Add Comment
Please, Sign In to add comment