MaxRepeatedCharCount: Integer;
The MaxRepeatedCharCount property determines the maximum number of repeated characters that can be used in a password.
Sub Main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
PassPol: IMetabasePasswordPolicy;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
MU := MS.Policy;
PassPol := MU.PasswordPolicy;
PassPol.MaxRepeatedCharCount := 2;
MS.Apply;
End Sub Main;
After executing the example two repeating characters can be used in user's password.
See also: