Platform SDK: Active Directory, ADSI, and Directory Services |
The methods of the IADsDomain interface read and write the properties described in this topic. For more information see Interface Property Methods.
Property | Description | |
---|---|---|
AutoUnlockInterval
[Visual Basic] [C++] |
Indicates the minimum time elapsed before the account is automatically re-enabled. | |
IsWorkgroup
[Visual Basic] [C++] |
Indicates a flag that indicates whether or not the domain is a workstation belonging to a workgroup. | |
LockoutObservationInterval
[Visual Basic] [C++] |
Indicates the time window during which the bad password count is monitored and accumulated before determining if the account needs to be locked out. For example, if the number of bad password attempts on an account exceed the threshold (Maximum Bad Passwords Allowed) during the specified time period (Lockout Observation Interval) the account will be locked out by setting the appropriate property in the Login Parameter property set. | |
MinPasswordAge
[Visual Basic] [C++] |
Indicates the minimum amount of time, in seconds, before the password is allowed to be changed. | |
MinPasswordLength
[Visual Basic] [C++] |
Indicates the minimum number of characters that must be typed in for a password. | |
MaxBadPasswordsAllowed
[Visual Basic] [C++] |
Indicates the maximum number of bad password logins until the account becomes locked out. | |
MaxPasswordAge
[Visual Basic] [C++] |
Indicates the maximum amount of time, in seconds, after which the password must be changed by the owner. | |
PasswordAttributes
[Visual Basic] [C++] |
Indicates restrictions on passwords, as defined in the following: | |
Attribute PASSWORD_ATTR_NONE PASSWORD_ATTR_MIXED_CASE PASSWORD_ATTR_COMPLEX |
Value 0x00000000 0x00000001 0x00000002 |
|
Note For PASSWORD_ATTR_COMPLEX, the password must include at least one punctuation mark or non-printable character. | ||
PasswordHistoryLength
[Visual Basic] [C++] |
Indicates the number of previous passwords saved in the history list. The user cannot reuse a password that is in the history list. |
The following Visual Basic code snippet displays all the optional properties defined for a domain and then change the MinPasswordLength property value.
Dim dom as IADsDomain Dim cls as IADsClass Dim v Set dom = GetObject("WinNT://myDomain") Set cls = GetObject(dom.Schema) For Each x in cls.OptionalProperties v = dom.Get(x) if x = "MinPasswordLength" then v = 10 end if debug.print x & " = " & v Next
The following C++/C code snippet prints out the value of the MinPasswordLength property of a domain object.
LPWSTR adsPath = L"WinNT://myDomain"; // bind to the domain object hr = ADsGetObject(adsPath,IID_IADsDomain,(void**)&pDomain); if(FAILED(hr)) return NULL; printf("Domain:\n"); IADs* pADsDom; pDomain->QueryInterface(IID_IADs,(void**)&pADsDom); VARIANT varVal; VariantInit(&varVal); pADsDom->Get(L"MinPasswordLength",&varVal); printf(" MinPasswordLength = %d\n", V_I4(&varVal)); VariantClear(&varVal); pADsDom->Release(); pDomain->Release();