VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ADSI sample showing how to list the password policy info of a domain.

by Bart Jonkman (20 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

ADSI sample showing how to list the password policy info of a domain.

Rate ADSI sample showing how to list the password policy info of a domain.



' List password policy info of a domain.

' Goto http://www.activxperts.com/activmonitor and click on ADSI Samples
' for more samples


Sub ListPasswordPolicyInfo( strDomain )
Dim objComputer
    Set objComputer = GetObject("WinNT://" & strDomain )
    WScript.Echo "MinPasswordAge: " &  ((objComputer.MinPasswordAge) / 86400)
    WScript.Echo "MinPasswordLength: " &  objComputer.MinPasswordLength
    WScript.Echo "PasswordHistoryLength: " &  objComputer.PasswordHistoryLength
    WScript.Echo "AutoUnlockInterval: " &  objComputer.AutoUnlockInterval
    WScript.Echo "LockOutObservationInterval: " &  objComputer.LockOutObservationInterval
End Sub



' Main

Dim strDomain
Do
   strDomain = inputbox( "Please enter a domainname", "Input" )
Loop until strDomain <> ""

ListPasswordPolicyInfo( strDomain )


WScript.Echo( vbCrlf & "For more samples, goto http://www.activxperts.com/activmonitor and click" )
WScript.Echo( "on ADSI samples" )

Download this snippet    Add to My Saved Code

ADSI sample showing how to list the password policy info of a domain. Comments

No comments have been posted about ADSI sample showing how to list the password policy info of a domain.. Why not be the first to post a comment about ADSI sample showing how to list the password policy info of a domain..

Post your comment

Subject:
Message:
0/1000 characters