Ligesom med nedenstående vil du og så kunne få last logindate - kender dog ikke variabel navnet.
Alternativt skal du købe noget software der kan hente disse informationer.
' Lavet af Jesper Hanno Hansen, Jesper@hanno.dk
'
www.hanno.dk' ************************************************
' Viser Brugere informationer via ADO.
' ************************************************
Set Network = Wscript.CreateObject("Wscript.Network")
Set Shell = Wscript.CreateObject("Wscript.Shell")
Set con = CreateObject("ADODB.Connection")
Set com = CreateObject("ADODB.Command")
con.Provider = "ADsDSOObject"
con.Open "Active Directory Provider"
Set Com.ActiveConnection = con
StrL = VbCrlf
StrT = VbTab
StrTitel = "Bruger Info Via ADO ..."
StrBruger = InputBox ("Skriv et Brugernavn...","Skriv et Navn...","Jesper")
Com.CommandText = "select cn,telephoneNumber,mail,userPrincipalName,scriptPath,title,department,logonCount from '
LDAP://DC=univeyor, DC=dk' WHERE objectClass='user' AND givenName='" & StrBruger & "'"
Set rs = Com.Execute
While Not rs.EOF
Str = "Display Navn: " & StrT & rs.Fields ("cn") & StrL
Str = Str & "Telefon Nummer: " & StrT & rs.Fields("telephoneNumber") & StrL
Str = Str & "E-Mail: " & StrT & StrT & rs.Fields ("mail") & StrL
Str = Str & "Login Script: " & StrT & rs.Fields ("scriptPath") & StrL
Str = Str & "Titel: " & StrT & StrT & rs.Fields ("title") & StrL
Str = Str & "Afdeling: " & StrT & StrT & rs.Fields ("department") & StrL
Str = Str & "Antal Login: " & StrT & rs.Fields ("logonCount") & StrL
rs.MoveNext
Wend
Shell.Popup Str,20,StrTitel,64