Inherited from
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 |
Gets the Security object for managing permissions for the domain |
|
Assigns a task to the user/group, for the Domain |
|
Gets and sets the minimum time before an account is automatically re-enabled |
|
Returns the array of trustees for the given task |
|
Gets the name of the Primary Domain Controller |
|
Returns TRUE if the RelativeName is a valid Name of the given Class type |
|
Returns TRUE if the DOMAIN is actually a workstation that is a member of a workgroup |
|
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 |
|
Gets and sets the maximum number of bad password logins until an account is locked out |
|
Gets and sets the age at which a password must be changed by the owner |
|
Gets and sets the minimum password age before allowing a password can be changed |
|
Gets and sets the minimum number of characters that must be typed in for a password |
|
Gets the password restrictions |
|
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 |
|
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