IADsDomain Property Methods
The IADsDomain interface methods read and write the properties described in this topic. For more information, see Interface Property Methods.
Properties
-
AutoUnlockInterval
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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
-
-
Access type: Read-only
-
Scripting data type: VARIANT_BOOL
-
// C++ method syntax HRESULT get_IsWorkgroup( [out] VARIANT_BOOL* retval );
This property is no longer implemented.
-
-
LockoutObservationInterval
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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 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.
-
-
MaxBadPasswordsAllowed
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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.
-
-
MinPasswordAge
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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.
-
-
PasswordAttributes
-
-
PASSWORD_ATTR_NONE (0x00000000)
-
PASSWORD_ATTR_MIXED_CASE (0x00000001)
-
PASSWORD_ATTR_COMPLEX (0x00000002)
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.
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax HRESULT get_PasswordAttributes( [out] LONG* plPasswordAttributes ); HRESULT put_PasswordAttributes( [in] LONG lPasswordAttributes );
PasswordHistoryLength
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax 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.
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 |
|
DLL |
|
IID |
IID_IADsDomain is defined as 00E4C220-FD16-11CE-ABC4-02608C9E7553 |