The following works:
 Code:
'Result - UserDN: ' ADSIUserInfo() @CRLF
; entire ADSIUserInfo UDF inserted here...
This displays the userDN string for the current user. You then use this DN string (or adapt it for another similar user) to query or set the additional attributes. The UserName must be in the UserDN format.

The UDF is typically called without args to obtain a UserDN, and then called with the UserDN to query or define the attribute.

Make sure you include the entire UDF, unmodified, somewhere in your script. Most of us place UDFs at the end of the script, or use CALL statements to load them at the beginning. I prefer to embed the UDFs at the end since they will always be available and "frozen" in a working configuration. Using external UDFs can cause an app to break when a UDF is updated and all dependent scripts aren't tested.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D