IADsDomain Interface

Inherited from

IADs

IDispatch

IUnknown

Applies to Objects
Domain

This is the primary interface of the Domain Object. You can use this interface to get or set domain properties like minimum password length, auto unlock interval, and so on.

Property/Method

Description

Access

Gets the Security object for managing permissions for the domain

AssignTask

Assigns a task to the user/group, for the Domain

AutoUnlockInterval

Gets and sets the minimum time before an account is automatically re-enabled

GetAccountsWithTask

Returns the array of trustees for the given task

GetDCName

Gets the name of the Primary Domain Controller

IsValid

Returns TRUE if the RelativeName is a valid Name of the given Class type

IsWorkGroup

Returns TRUE if the DOMAIN is actually a workstation that is a member of a workgroup

LockoutObservationInterval

Gets and sets the time period during which the bad password count is monitored and accumulated to decide if an account needs to be locked out

MaxBadPasswordsAllowed

Gets and sets the maximum number of bad password logins until an account is locked out

MaxPasswordAge

Gets and sets the age at which a password must be changed by the owner

MinPasswordAge

Gets and sets the minimum password age before allowing a password can be changed

MinPasswordLength

Gets and sets the minimum number of characters that must be typed in for a password

PasswordAttributes

Gets the password restrictions

PasswordHistoryLength

Gets and sets the maximum number of passwords that can be stored in the history list. The user cannot reuse a password that is in the history list

RemoveTask

Remove the task that has been assigned to the user/group, for the Domain

Example
This example demonstrates the use of IADsDomain Properties and Methods.

Dim Domain as IADsDomain
'Bind to the known NT Domain object.
'Here MSFT is your domain name.
Set Domain = GetObject("NTDS://MSFT")
'Debug.Print to print the Name, Description etc. to the debug window.
'Here you can use Name property as IADsDomain is derived from IADs.
Debug.Print Domain.Name
Debug.Print Domain.GetDCName 
Debug.Print Domain.MinPasswordLength
Debug.Print Domain.MaxPasswordAge
Debug.Print Domain.MaxBadPasswordsAllowed
'Change the MinPasswordLength of the Domain.
Domain.MinPasswordLength = 5
'Call SetInfo to commit the changes to the network.
'This will happen only if you have privileges for this operation.
Domain.SetInfo
'Call GetInfo to get the new values.
Domain.GetInfo
'Display minimum password length.
Debug.Print Domain.MinPasswordLength