Список атрибутов (параметров), которые может вернуть командлет get-ADUser

  • Михаил
  • 12 мин. на прочтение
  • 130
  • 13 Dec 2015
  • 13 Dec 2015

Get-ADUser возвращает лишь 17 из 110 атрибутов и свойств, привязанных к учетной записи пользователя AD, но это можно исправить, добавив параметр -properties (или -pr) к предложению Get-ADUser.

Например:

get-aduser -f "title -like 'teach*'" -properties office, title

Полный список атрибутов представлен в следующей таблице:

PropertySyntaxR/RWlDAPDisplayName
AccountExpirationDateDateTimeRWaccountExpires, converted to local time
AccountLockoutTimeDateTimeRWlockoutTime, converted to local time
AccountNotDelegatedBooleanRWuserAccountControl (bit mask 1048576)
AllowReversiblePasswordEncryptionBooleanRWuserAccountControl (bit mask 128)
BadLogonCountInt32RbadPwdCount
CannotChangePasswordBooleanRWnTSecurityDescriptor
CanonicalNameStringRcanonicalName
CertificatesADCollectionRWuserCertificate
ChangePasswordAtLogonBooleanWIf pwdLastSet = 0
CityStringRWl
CNStringRcn
CompanyStringRWcompany
CountryStringRWc (2 character abbreviation)
CreatedDateTimeRwhenCreated
DeletedBooleanRisDeleted
DepartmentStringRWdepartment
DescriptionStringRWdescription
DisplayNameStringRWdisplayName
DistinguishedNameString (DN)RdistinguishedName
DivisionStringRWdivision
DoesNotRequirePreAuthBooleanRWuserAccountControl (bit mask 4194304)
EmailAddressStringRWmail
EmployeeIDStringRWemployeeID
EmployeeNumberStringRWemployeeNumber
EnabledBooleanRWuserAccountControl (bit mask not 2)
FaxStringRWfacsimileTelephoneNumber
GivenNameStringRWgivenName
HomeDirectoryStringRWhomeDirectory
HomedirRequiredBooleanRWuserAccountControl (bit mask 8)
HomeDriveStringRWhomeDrive
HomePageStringRWwWWHomePage
HomePhoneStringRWhomePhone
InitialsStringRWinitials
LastBadPasswordAttemptDateTimeRbadPasswordTime, converted to local time
LastKnownParentString (DN)RlastKnownParent
LastLogonDateDateTimeRlastLogonTimeStamp, converted to local time
LockedOutBooleanRWmsDS-User-Account-Control-Computed (bit mask 16)
LogonWorkstationsStringRWuserWorkstations
ManagerString (DN)RWmanager
MemberOfADCollectionRmemberOf
MNSLogonAccountBooleanRWuserAccountControl (bit mask 131072)
MobilePhoneStringRWmobile
ModifiedDateTimeRwhenChanged
NameStringRcn (Relative Distinguished Name)
ObjectCategoryStringRobjectCategory
ObjectClassStringRobjectClass, most specific value
ObjectGUIDGuidRobjectGUID converted to string
OfficeStringRWphysicalDeliveryOfficeName
OfficePhoneStringRWtelephoneNumber
OrganizationStringRWo
OtherNameStringRWmiddleName
PasswordExpiredBooleanRWmsDS-User-Account-Control-Computed (bit mask 8388608)
PasswordLastSetDateTimeRWpwdLastSet, local time
PasswordNeverExpiresBooleanRW

userAccountControl (bit mask 64

Вкладка "Учетная запись", поле "Параметры учетной записи", галка "Срок действия пароля не ограничен"

PasswordNotRequiredBooleanRWuserAccountControl (bit mask 32)
POBoxStringRWpostOfficeBox
PostalCodeStringRWpostalCode
PrimaryGroupStringRGroup with primaryGroupToken
ProfilePathStringRWprofilePath
ProtectedFromAccidentalDeletionBooleanRWnTSecurityDescriptor
SamAccountNameStringRWsAMAccountName
ScriptPathStringRWscriptPath
ServicePrincipalNamesADCollectionRWservicePrincipalName
SIDSidRobjectSID converted to string
SIDHistoryADCollectionRsIDHistory
SmartcardLogonRequiredBooleanRWuserAccountControl (bit mask 262144)
StateStringRWst
StreetAddressStringRWstreetAddress
SurnameStringRWsn
TitleStringRWtitle
TrustedForDelegationBooleanRWuserAccountControl (bit mask 524288)
TrustedToAuthForDelegationBooleanRWuserAccountControl (bit mask 16777216)
UseDESKeyOnlyBooleanRWuserAccountControl (bit mask 2097152)
UserPrincipalNameStringRWuserPrincipalName