LastFailedLogin, PasswordLastChanged, BadLoginCount 
Author Message
 LastFailedLogin, PasswordLastChanged, BadLoginCount

With the ADSI WinNT system provider, am I correct in assuming that the
IADsUser Properties "LastFailedLogin", "PasswordLastChanged", and
"BadLoginCount" are NOT implemented?

In the ADSI help file, I see the properties listed under "IADsUser", but
not under
the "WinNT Schema Class Mandatory and Optional Properties". I'm guessing
that that
means it ain't there (duh? that's probably obvious to a lot of folks,
but I'm
kinda new to this SDK documentation stuff).

I've tried something similar to the below (to paraphrase a script
The "LastLogin" works, but the others get me "Win32 Error 0x8000500D"

WSH v3.1b
IE v3.02
ADSI v? (the downloaded adsx86.exe is 548,907 bytes, 6/1/98; help file
says v2.0b1)

CRLF = Chr(13) & Chr(10)
strMsgBoxTitle = "Debug mode"

Set objShell = WScript.CreateObject("WScript.Shell")
Set objUser = GetObject("WinNT://fill_in_your_domain/fill_in_your_user")
  strLastFailedLogin=objUser.LastFailedLogin         ' Win32 errors
  strPasswordLastChanged=objUser.PasswordLastChanged ' Win32 errors
  strBadLoginCount=objUser.BadLoginCount             ' Win32 errors

strMsgBoxText=strMsgBoxText & "Last Logon: " & strLastLogin & CRLF
strMsgBoxText=strMsgBoxText & "Last Failed Logon: " & strLastFailedLogin
strMsgBoxText=strMsgBoxText & "Password Changed: " &
strPasswordLastChanged & CRLF
strMsgBoxText=strMsgBoxText & "Number Failed Logons: " &
strBadLoginCount & CRLF

Call show_env(strMsgBoxText)

Sub show_env(strMsgBoxText)
        MsgBox strMsgBoxText, vbInformation, strMsgBoxTitle
End Sub

Just sign me...
"SDK Documentation challenged"

Sun, 11 Feb 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

Powered by phpBB® Forum Software