IADsUser Interface

Inherited from

IADs

IDispatch

IUnknown

Applies to Objects

User

This is the primary interface of the User Object. You can use this interface to get and set user properties. It also provides methods to set the password properties of users.

Property/Method

Description

Access

Gets the Security object for managing permissions for the user

AccountDisabled

Indicates whether the account is or should be disabled

AccountExpirationDate

Gets and sets the date and time after which the user cannot log in

BadLoginAddress

Gets the address of the last node considered an "intruder"

BadLoginCount

Gets the number of bad logon attempts since the last reset time

ChangePassword

Changes a user's password from a specified old value to a new value

Country

Gets and sets the reference to the country

Department

Gets the department of the user within the organization

Description

Gets and sets the text Description of a user

Division

Gets the user's division within the organization

EmailAddress

Gets the end-user's email address

EmployeeID

Gets the end-user's employee identification

FaxNumber

Gets the end-user's list of fax phone numbers

FirstName

Gets the end-user's first name

FullName

Gets and sets a user's full name

GetTasks

Gets and sets the user’s full name.

GraceLoginsAllowed

Gets the number of times user can log on after password has expired

GraceLoginsRemaining

Gets the number of grace logins left before locking account

Groups

Returns a collection of Group objects representing the groups that a user is a member of

HomeDirectory

Gets and sets a user's home directory

HomePage

Gets the end-user's URL defining a home page

IsAccountLocked

Gets if the account is locked because of intruder detection

Languages

Gets a user's language

LastFailedLogin

Gets the date & time of last failed network login

LastLogin

Gets the time and date of last network logon

LastLogoff

Gets the time and date of last network logoff

LastName

Gets the end-user's last name

LoginHours

Gets and sets the hours during which a user can log on to the domain

LoginScript

Gets and sets the logon script path

LoginWorkstations

Gets and sets a list of names of workstations at which a user can log on. As many as eight workstations can be specified; the names must be separated by commas (,). If you do not want to restrict the number of workstations, use a Null string

Manager

Gets the end-user's manager

MaxLogins

Gets the maximum number of simultaneous logins

MaxStorage

Gets and sets the maximum amount of disk space (in Kilobytes) a user can have

NamePrefix

Gets the end-user's prefix (Mr., Ms., Hon.)

NameSuffix

Gets the end-user's suffix (Jr., III)

OfficeLocations

Gets the array of end-user locations

OtherName

Gets the end-user's additional name (nickname, middle name)

PasswordChangeAllowed

Indicates whether a password change is allowed

PasswordExpirationDate

Gets the date & time when password will expire

PasswordExpires

Indicates whether a password expires or not.

PasswordLastChanged

Gets the last time a password was changed.

PasswordMinimumLength

Gets the minimum number of characters allowed in password

PasswordRequired

Indicates whether a password is required.

Picture

Gets the array of bytes with the end-user's image

PostalAddresses

Gets the array of end-user post office addresses

PostalCodes

Gets the array of zip codes for the postal addresses

Profile

Gets and sets the path of a user's profile.

Rename

Renames a user with a specified name.

RequireUniquePassword

Gets whether or not new password must be different than one in the password history list

SeeAlso

Gets the array of ADsPaths of the other objects related to this user

SetPassword

Sets a user's password to the value specified by a new password

SuccessfulLoginCount

Gets the count of total successful network logons.

TelephoneHome

Gets the end-user's list of home telephone numbers

TelephoneMobile

Gets the end-user's list of mobile telephone numbers

TelephoneNumber

Gets the end-user's list of work related telephone numbers

TelephonePager

Gets the end-user's list of pager telephone numbers

Title

Gets the end-user's title within the organization

UserMustChangePassword

Indicates whether a user must change password at next logon.

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

Dim User as IADsUser
'Bind to the known NT User object.
'Here MSFT is your domain name and Sun is name of a User in MSFT.
Set User = GetObject("NTDS://MSFT/Sun")
'Debug.Print to print the name, Description etc. to the debug window.
'Here you can use Name property as IADsUser is derived from IADs.
Debug.Print User.Name
Debug.Print User.Description
Debug.Print User.FullName
Debug.Print User.AccountExpirationDate
'Change the Description of the User.
User.Description = "New Description"
'Call SetInfo to commit the changes to the network.
'You could do this only if you have privileges for this operation.
User.SetInfo

'Now refresh the ADS object cache with a GetInfo call.
User.GetInfo
'Display Description.
Debug.Print User.Description
'Change the User's password using his old password.
'Here queriscript is old password and Argus is new password.
User.ChangePassword "queriscript", "Argus"