cerruti1881
Technical User
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?
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?