WindowsServices::ActiveDirectory::User Object

Description

The WindowsServices::ActiveDirectory::User object contains properties and methods available for working with an Active Directory user.

There are many user account attributes available as properties on this object. If any other attributes are required, the list of those attributes must be set on the WindowsServices::ActiveDirectory::Domain object's AdditionalUserAttributeNames property before the WindowsServices::ActiveDirectory::Domain::GetUser() method is called. The GetAttribute() method with the attribute name can then be used to get one of the additional attributes not available as property.

Properties

NameCharacter

Name is the name of the Active Directory user. Read Only.

DescriptionCharacter

Description is the description of the Active Directory user. Read Only.

DistinguishedNameCharacter

DistinguishedName is the LDAP distinguished name of the user. Read Only.

SidCharacter

Sid is the Windows security id of the user. Read Only.

DisplayNameCharacter

DisplayName is the friendly of the user. Read Only.

SamAccountNameCharacter

SamAccountName is the SAM account name for the user. Read Only

GuidCharacter

Guid is the guid for the user. Read Only

RolesCharacter

A crlf delimited list of the user's roles. Read Only

EmailAddressCharacter

An array of users that belong to the group.

EmployeeIdCharacter

EmployeeId is the employee ie for the user. Read Only.

AccountExpirationDateTime

AccountExpirationDate is date/time the user's account expires. Read Only.

AccountLockoutTimeTime

AccountLockoutTime is a date/time the user's account was locked out. Read Only.

AccountLockedOutTime

AccountLockedOut indicates whether the user's account is locked out or not. Read Only.

BadLogonCountNumeric

BadLogonCount is the number of invalid attempts logging into the user's account. Read Only.

DelegationPermittedLogical

DelegationPermitted indicates whether or not this user's account may be delegated. Read Only.

EnabledLogical

Enabled indicates whether this user's account is enabled or not. Read Only.

GivenNameCharacter

GivenName for the user. Read Only.

HomeDirectoryCharacter

HomeDirectory is the home directory for this user's account. Read Only.

HomeDriveCharacter

HomeDrive is the home drive for this user's account. Read Only.

LastBadPasswordAttemptTime

LastBadPasswordAttempt is the date/time of the last invalid login attempt. Read Only.

LastLogonTime

LastLogon is is the date/time of the last successful login. Read Only.

LastPasswordSetTime

LastPasswordSet is the date/time for the last time the password was set for the user. Read Only.

MiddleNameCharacter

MiddleName is the middle name of the user. Read Only.

PasswordNeverExpiresLogical

PasswordNeverExpires indicates whether the user's password can expire or not. Read Only.

ScriptPathCharacter

ScriptPath is the script path for this user account. Read Only.

SmartcardLogonRequiredLogical

SmartcardLogonRequired indicates whether smartcard login is required or not. Read Only.

SurnameCharacter

Surname is the surname of the user. Read Only.

UserCannotChangePassword

UserCannotChangePassword indicates whether the user can change the account's password or not. Read Only.

UserPrincipalNameCharacter

UserPrincipalName is Active Directory principle name of the user. Read Only.

VoiceTelephoneNumberCharacter

VoiceTelephoneNumber is the telephone number of the user. Read Only.

Methods

FromUsername Method

Get a WindowsServices::ActiveDirectory::User object given a user name. This method can only be used when machines and application are configured for Integrated Windows Authentication.

GetAttibute Method

Get a user's attribute for a WindowsServices::ActiveDirectory::User object.

GetUserRoles Method

This is a static method to get a user's roles without individually creating a WindowsServices::ActiveDirectory::Domain object and finding the user through it.

User Method

Create a WindowsServices::ActiveDirectory::User object. This is for internal use only. Use a WindowsServices::ActiveDirectory::Domain or WindowsServices::ActiveDirectory::Group object to get a user.