ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI.
ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI.
Rate ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI.
(2(2 Vote))
' 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" )
ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI. Comments
No comments yet — be the first to post one!
Post a Comment