Link to home
Start Free TrialLog in
Avatar of yehudaha
yehudahaFlag for Israel

asked on

how do i set the column name in active directory user search

how do i set the column name in active directory user search with vbscript ?

i created a user named "yehuda testing"

but it looks like that and not showing display name like other userobjects

 User generated image
inside it look like this

 User generated image
i used
sAMAccountName,givenName,sn,displayName,userPrincipalName
Avatar of Tasmant
Tasmant
Flag of France image

ADUC console use ANR (ambiguous name resolution) to display results: http://support.microsoft.com/kb/243299/en-us
When using VBS, you need to specify each attribute you want to return.
If you use recordset, you can write columns like this if you don't know which attribute is in the field.

For i=0 To objRecordSet.Fields.Count-1
	WScript.Echo "Field " & i & ": " & objRecordset.Fields(i).Name
Next

Open in new window

Avatar of yehudaha

ASKER

i don't think you understood me

i want to know how can i set the name column in the first picture with vbscript, wich attribute ?
as i answered, you cannot really change the "name" column in the MMC itself.
the name column represent any attribute from the ambiguous name resolution, and not one especially.
You CAN change the name that he is trying to modify, "YehudaT", within the MMC.  I am guessing he wants it to read "yehuda Testing". This can be accomplished by simply right clicking on the name and selecting rename or alternately you can click; pause; click and you will be able to change the name that is displayed.  However, this is not what he wants to do.  He wants to be able to change this using a script cause I am guessing that there are several users who have this problem.  unfortunately I am not sure which user attribute governs that.
ASKER CERTIFIED SOLUTION
Avatar of yehudaha
yehudaha
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
there is a way you need to modify the "cn" attribute