Displays password settings for the domain
Set objHash = CreateObject("Scripting.Dictionary")objHash.Add "DOMAIN_PASSWORD_COMPLEX", &h1objHash.Add "DOMAIN_PASSWORD_NO_ANON_CHANGE", &h2objHash.Add "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", &h4objHash.Add "DOMAIN_LOCKOUT_ADMINS", &h8objHash.Add "DOMAIN_PASSWORD_STORE_CLEARTEXT", &h16objHash.Add "DOMAIN_REFUSE_PASSWORD_CHANGE", &h32Set objDomain = GetObject("LDAP://dc=fabrikam,dc=com")intPwdProperties = objDomain.Get("PwdProperties")WScript.Echo "pwdProperties = " & intPwdPropertiesFor Each Key In objHash.KeysIf objHash(Key) And intPwdProperties ThenWScript.Echo Key & " is enabled"ElseWScript.Echo Key & " is disabled"End IfNext
This is a VB Script, this can be used by saving the file in .vbs file