VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI.

by Anonymous (267 Submissions)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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.



' 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 - Retrieves password policy info of a domain. Written in VBScript, using ADSI. Comments

No comments have been posted about ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI.. Why not be the first to post a comment about ADSI sample - Retrieves password policy info of a domain. Written in VBScript, using ADSI..

Post your comment

Subject:
Message:
0/1000 characters