My work's intranet actually works with Windows 2003 (PDC) and some NT (BDC), so the active directory works only in 2003 interim mode.
I must list the "LastLogonTimeStamp" value of all the users of the Active Directory.
I found a small script that, in theory, helps. It is:
Dim UserDE as new
DirectoryEntry("LDAP://cn=sharpe,ou=users,dc=cahs,dc=colostate,dc =edu")
Dim highpart,lowpart,lastlogon as long
highpart = UserDE.Properties("LastLogonTimeStamp")(0).HighPar t
Lowpart = UserDE.Properties("LastLogonTimeStamp")(0).Lowpart
lastLogon = (HighPart * 2^32) - Lowpart
msgbox DateTime.FromFileTime(lastLogon)
It doesn't works!
Is it not visual basic script? Is something wrong?
Thanks for your help