The IADsDomain interface methods read and write the properties described in this topic. For more information, see Interface Property Methods.
Properties
AutoUnlockInterval
Indicates the minimum time that must elapse before the account is automatically reenabled.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_AutoUnlockInterval(
[out] LONG* plAutoUnlockInterval
);
HRESULT put_AutoUnlockInterval(
[in] LONG lAutoUnlockInterval
);
IsWorkgroup
This property is no longer implemented.
Access type: Read-only
Scripting data type: VARIANT_BOOL
// C++ method syntax
HRESULT get_IsWorkgroup(
[out] VARIANT_BOOL* retval
);
LockoutObservationInterval
Indicates the time window during which the bad password count is monitored and accumulated before determining whether 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.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_LockoutObservationInterval(
[out] LONG* plLockoutObservationInterval
);
HRESULT put_LockoutObservationInterval(
[in] LONG lLockoutObservationInterval
);
MaxBadPasswordsAllowed
Indicates the maximum number of bad password logins allowed before an account lockout.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_MaxBadPasswordsAllowed(
[out] LONG* plMaxBadPasswordsAllowed
);
HRESULT put_MaxBadPasswordsAllowed(
[in] LONG lMaxBadPasswordsAllowed
);
MaxPasswordAge
Indicates the maximum time interval, in seconds, after which the password must be changed by the user.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_MaxPasswordAge(
[out] LONG* plMaxPasswordAge
);
RESULT put_MaxPasswordAge(
[in] LONG lMaxPasswordAge
);
MinPasswordAge
Indicates the minimum time interval, in seconds, before the password can be changed.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_MinPasswordAge(
[out] LONG* plMinPasswordAge
);
HRESULT put_MinPasswordAge(
[in] LONG lMinPasswordAge
);
MinPasswordLength
Indicates the minimum number of characters that must be used for a password.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_MinPasswordLength(
[out] LONG* plMinPasswordLength
);
HRESULT put_MinPasswordLength(
[in] LONG lMinPasswordLength
);
PasswordAttributes
Indicates restrictions on passwords, as defined by the following list of attributes and values.
Note:
For PASSWORD_ATTR_COMPLEX, the password must include at least one punctuation mark or non-printable character.
PASSWORD_ATTR_NONE (0x00000000)
PASSWORD_ATTR_MIXED_CASE (0x00000001)
PASSWORD_ATTR_COMPLEX (0x00000002)
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_PasswordAttributes(
[out] LONG* plPasswordAttributes
);
HRESULT put_PasswordAttributes(
[in] LONG lPasswordAttributes
);
PasswordHistoryLength
Indicates the number of previous passwords saved in the history list. The user cannot reuse a password in the history list.
Access type: Read/write
Scripting data type: LONG
// C++ method syntax
HRESULT get_PasswordHistoryLength(
[out] LONG* plPasswordHistoryLength
);
HRESULT put_PasswordHistoryLength(
[in] LONG lPasswordHistoryLength
);
Examples
The following code example displays the value of the PasswordHistoryLength property.
Dim dom As IADsDomain
On Error Resume Next
Set dom = GetObject("WinNT://myDomain")
debug.print "PasswordHistoryLength" & dom.PasswordHistoryLength
The following code example displays the value of the PasswordHistoryLength property.
LPWSTR adsPath = L"WinNT://myDomain";
LONG nPasswordHistoryLength = 0;
// Bind to the domain object.
hr = ADsGetObject(adsPath,IID_IADsDomain,(void**)&pDomain);
if(FAILED(hr)) {goto Cleanup;}
hr = pDomain->get_PasswordHistoryLength(&nPasswordHistoryLength);
if(FAILED(hr)) {goto Cleanup;}
printf("Password history length: %d",nPasswordHistoryLength);
Cleanup:
if(pDomain) pDomain->Release();
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Header | Iads.h |
| DLL | Activeds.dll |
| IID | IID_IADsDomain is defined as 00E4C220-FD16-11CE-ABC4-02608C9E7553 |
See also
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
