Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve some user account attributes

Status
Not open for further replies.

cerruti1881

Technical User
Nov 8, 2012
10
AU
I was trying to retrieve some of the user account attributes from AD.

Firstly, I use: Set objUser = GetObject(strFullLDAPName)
Then I use: objUser.<Attributes> to retrieve values, where Attributes = LDAP Display Name
I was able to get some of the attribute value but not the following:

strCanonicalName = objUser.canonicalName
Wscript.Echo "CanonicalName: " & strCanonicalName
Wscript.Echo
strAccountExpires = objUser.AccountExpires
Wscript.Echo "AccountExpires: " & strAccountExpires
Wscript.Echo
strLastLogon = objUser.lastLogon
Wscript.Echo "LastLogon: " & strLastLogon
Wscript.Echo
strLastLogoff = objUser.lastLogoff
Wscript.Echo "LastLogoff: " & strLastLogoff
Wscript.Echo
strObjectSid = objUser.objectSid
Wscript.Echo "ObjectSid: " & strObjectSid
Wscript.Echo
strProxyAddresses = objUser.proxyAddresses
Wscript.Echo "ProxyAddresses: " & strProxyAddresses
Wscript.Echo
strURL = objUser.url
Wscript.Echo strURL
Wscript.Echo
strMemberOf = objUser.memberOf
Wscript.Echo strMemberOf
Wscript.Echo


Does anyone know how?
 
I have managed to retrieve most of the above except: AccountExpires, objectSid.
I also want to retrieve objectGUID and vasco-token number that associated with the user account.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top