Directory Services

IADsDomain Property Methods

The IADsDomain interface methods read and write the properties described in this topic. For more information, see Interface Property Methods.

Properties

Property Description
AutoUnlockInterval

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_AutoUnlockInterval
([out] LONG* plAutoUnlockInterval);
HRESULT put_AutoUnlockInterval
([in] LONG lAutoUnlockInterval);

Indicates the minimum time that must elapse before the account is automatically reenabled.
IsWorkgroup

[Visual Basic]
Access: Read-only
DataType: Variant

[C++]
HRESULT get_IsWorkgroup
([out] VARIANT_BOOL* retval);

This property is no longer implemented.
LockoutObservationInterval

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_LockoutObservationInterval
([out] LONG* plLockoutObservationInterval);
HRESULT put_LockoutObservationInterval
([in] LONG lLockoutObservationInterval);

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]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_MinPasswordAge
([out] LONG* plMinPasswordAge);
HRESULT put_MinPasswordAge
([in] LONG lMinPasswordAge);

Indicates the minimum time interval, in seconds, before the password can be changed.
MinPasswordLength

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_MinPasswordLength
([out] LONG* plMinPasswordLength);
HRESULT put_MinPasswordLength
([in] LONG lMinPasswordLength);

Indicates the minimum number of characters that must be used for a password.
MaxBadPasswordsAllowed

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_MaxBadPasswordsAllowed
([out] LONG* plMaxBadPasswordsAllowed);
HRESULT put_MaxBadPasswordsAllowed
([in] LONG lMaxBadPasswordsAllowed);

Indicates the maximum number of bad password logins allowed before an account lockout.
MaxPasswordAge

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_MaxPasswordAge
([out] LONG* plMaxPasswordAge);
RESULT put_MaxPasswordAge
([in] LONG lMaxPasswordAge);

Indicates the maximum time interval, in seconds, after which the password must be changed by the user.
PasswordAttributes

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_PasswordAttributes
([out] LONG* plPasswordAttributes);
HRESULT put_PasswordAttributes
([in] LONG lPasswordAttributes);

Indicates restrictions on passwords, as defined in the following.
Attribute Value
PASSWORD_ATTR_NONE PASSWORD_ATTR_MIXED_CASE PASSWORD_ATTR_COMPLEX 0x00000000 0x00000001 0x00000002

Note  For PASSWORD_ATTR_COMPLEX, the password must include at least one punctuation mark or non-printable character.

PasswordHistoryLength

[Visual Basic]
Access: Read/Write
DataType: Long

[C++]
HRESULT get_PasswordHistoryLength
([out] LONG* plPasswordHistoryLength);
HRESULT put_PasswordHistoryLength
([in] LONG lPasswordHistoryLength);

Indicates the number of previous passwords saved in the history list. The user cannot reuse a password in the history list.

Example Code [Visual Basic]

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

Example Code [C++]

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

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.

See Also

IADsDomain, Interface Property Methods