• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1149
  • Last Modified:

Invalid DN Syntax when using VBScript to create user accounts

I have a VBScript that creates user accounts based on input from an Excel spreadsheet. I want the newly created accounts in Active Directory to be displayed in <last_name>, <first_name> format (please note, I am not talking about the displayName attribute). I configured the CN column in Excel in that format but I receive an error saying "An Invalid DN syntax has been specified." How do I configured the spreadsheet or the VB code to allow the user accounts in AD to be displayed in the desired format?
Error.JPG
Excel.JPG
0
mcpp661
Asked:
mcpp661
1 Solution
 
oBdACommented:
The comma is a reserved character in ldap; you need to escape it with a backslash, for example with a Replace(TheCN, ",", "\,")
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now