Guys
I have a script that creates users in AD. I am having issues whereby the newly created user is not assigned the proper display name. I have scripted it so that the displayname should be firstname & surname but the name (or Full Name) in ADUC always appears as the User ID.
The basics of my code are as follows (the strings are already pre-defined and work):
According to ADSI, it is the name field that changes however when I tried adding an objUser.Put "name" it didn't work. Please can anyone advise me where I am going wrong?
--------------------------------------
"Insert funny comment in here!"
--------------------------------------
I have a script that creates users in AD. I am having issues whereby the newly created user is not assigned the proper display name. I have scripted it so that the displayname should be firstname & surname but the name (or Full Name) in ADUC always appears as the User ID.
The basics of my code are as follows (the strings are already pre-defined and work):
Code:
Set objUser = strUserContext.Create("User", "cn=" & strUserID)
objUser.Put "sAMAccountName", strUserID
objUser.Put "userPrincipalName", strUserID & "@" & strDomainForest
objUser.Put "givenName", strUserFirstName
objUser.Put "sn", strUserSurname
objUser.Put "displayName", strUserFirstName & " " & strUserSurname
objUser.Put "Description", strUserDescription
objUser.SetInfo
According to ADSI, it is the name field that changes however when I tried adding an objUser.Put "name" it didn't work. Please can anyone advise me where I am going wrong?
--------------------------------------
"Insert funny comment in here!"
--------------------------------------