you can also use a simple WMI query:
WMISimpleQuery('\\.\root\Directory\LDAP','ds_user','ds_sAMAccountName=%USERNAME%','_LDAP_') DS_mail DS_diplayName EndProc/TU ! MsgBox Mail: %_LDAP_DS_mail% Display name: %_LDAP_DS_displayName% EndProc
Hope this helps.
So do I need to create a job that run's on each computer that gathers this information? Not sure how this populates the Active Directory Display name in DSM.
do lyou like to synchronize more user data like the display name or email address from AD to DSM?
This is not possible since the DSM user object is a very simple data set.
If you have a script which should use the display name or email address (or anything else from the AD user object) you have to run the sScript in the user context (auto installer) and retrieve the information like the above script.
If this is too slow, there should be other possibilities, i.e. run a scheduled script (PowerShell or VBscript) on a server which retrieves the data from the AD and write it into an .ini file. From the eScript you can read the ini file even faster but the script needs to contact the server - and also the scirpt needs to run in user context.
The file may look like
where User1 and User2 are the cn of the AD object