Inherited from
Applies to Objects
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 |
Gets the Security object for managing permissions for the user |
|
Indicates whether the account is or should be disabled |
|
Gets and sets the date and time after which the user cannot log in |
|
Gets the address of the last node considered an "intruder" |
|
Gets the number of bad logon attempts since the last reset time |
|
Changes a user's password from a specified old value to a new value |
|
Gets and sets the reference to the country |
|
Gets the department of the user within the organization |
|
Gets and sets the text Description of a user |
|
Gets the user's division within the organization |
|
Gets the end-user's email address |
|
Gets the end-user's employee identification |
|
Gets the end-user's list of fax phone numbers |
|
Gets the end-user's first name |
|
Gets and sets a user's full name |
|
Gets and sets the user’s full name. |
|
Gets the number of times user can log on after password has expired |
|
Gets the number of grace logins left before locking account |
|
Returns a collection of Group objects representing the groups that a user is a member of |
|
Gets and sets a user's home directory |
|
Gets the end-user's URL defining a home page |
|
Gets if the account is locked because of intruder detection |
|
Gets a user's language |
|
Gets the date & time of last failed network login |
|
Gets the time and date of last network logon |
|
Gets the time and date of last network logoff |
|
Gets the end-user's last name |
|
Gets and sets the hours during which a user can log on to the domain |
|
Gets and sets the logon script path |
|
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 |
|
Gets the end-user's manager |
|
Gets the maximum number of simultaneous logins |
|
Gets and sets the maximum amount of disk space (in Kilobytes) a user can have |
|
Gets the end-user's prefix (Mr., Ms., Hon.) |
|
Gets the end-user's suffix (Jr., III) |
|
Gets the array of end-user locations |
|
Gets the end-user's additional name (nickname, middle name) |
|
Indicates whether a password change is allowed |
|
Gets the date & time when password will expire |
|
Indicates whether a password expires or not. |
|
Gets the last time a password was changed. |
|
Gets the minimum number of characters allowed in password |
|
Indicates whether a password is required. |
|
Gets the array of bytes with the end-user's image |
|
Gets the array of end-user post office addresses |
|
Gets the array of zip codes for the postal addresses |
|
Gets and sets the path of a user's profile. |
|
Renames a user with a specified name. |
|
Gets whether or not new password must be different than one in the password history list |
|
Gets the array of ADsPaths of the other objects related to this user |
|
Sets a user's password to the value specified by a new password |
|
Gets the count of total successful network logons. |
|
Gets the end-user's list of home telephone numbers |
|
Gets the end-user's list of mobile telephone numbers |
|
Gets the end-user's list of work related telephone numbers |
|
Gets the end-user's list of pager telephone numbers |
|
Gets the end-user's title within the organization |
|
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"