WhoKilledKenny
MIS
I'm currently research and looking for an answer.
I'm building an Admin web page that will do the following:
-Allow an administrator to enter the sAMAccount of a user.
-Click Submit
-VBScript will report last time user logged in.
So far I have the VBScript works. The issue is the Set objUser is hardcoded. example:
Set objUser = GetObject _
("LDAP://cn=johnDoe,OU=HR,dc=domain,dc=com")
What I would like to accomplish when the Admin enters the users logon name in the Form, is to have it search AD for the user the report on the LastLogon.
I've been looking at using the LDAP query of:
(&(&(objectCategory=Person)(objectClass=User))(sAMAccountName=strUserName))
Don't know if I'm on the right track.
Any assitance appreciated...
I'm building an Admin web page that will do the following:
-Allow an administrator to enter the sAMAccount of a user.
-Click Submit
-VBScript will report last time user logged in.
So far I have the VBScript works. The issue is the Set objUser is hardcoded. example:
Set objUser = GetObject _
("LDAP://cn=johnDoe,OU=HR,dc=domain,dc=com")
What I would like to accomplish when the Admin enters the users logon name in the Form, is to have it search AD for the user the report on the LastLogon.
I've been looking at using the LDAP query of:
(&(&(objectCategory=Person)(objectClass=User))(sAMAccountName=strUserName))
Don't know if I'm on the right track.
Any assitance appreciated...