AD User properties from VBScript?

1 view
Skip to first unread message

Ivica Kranjcic

unread,
May 7, 2002, 4:26:47 AM5/7/02
to
Hi folks,

I would like to pull-out just first name + surname from Active Directory,
but I can't find list of properties for object User.

Can anyone tell me just names for first name & surname properties of User
object?

Currently I'm using the following code for getting out DisplayName:
--
Set oObj = GetObject("WinNT://Machine_Name/User_Name,user")
--
where 'Machine_Name' is name of my W2K DC.

Any hints about approach?


TIA

Ivica


Michael Harris (MVP)

unread,
May 7, 2002, 9:49:38 AM5/7/02
to
> Can anyone tell me just names for first name & surname properties of User
> object?
>

FirstName
LastName
FullName

IADsUser
http://msdn.microsoft.com/library/en-us/netdir/adsi/iadsuser.asp

Note that there is no guarantee which of these are used and will have a value. For example, on our domain here at work, only FullName has a value in "last_name, first_name middle_initial' format and the other 2 are not used.

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--


Reply all
Reply to author
Forward
0 new messages