Tip: You can list the mandatory and optional properties of a specific class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#requires -Version 1 function Get-ADProperty { Param ( [string]$Class ) $schema = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySchema]::GetCurrentSchema() $schema.FindClass($Class).MandatoryProperties $schema.FindClass($Class).OptionalProperties } |
User class
1 2 3 4 5 6 |
#requires -Version 1 Get-ADProperty -Class User | Select-Object -Property Name, Syntax, IsIndexed, IsSingleValued, IsInGlobalCatalog, RangeLower, RangeUpper | Sort-Object -Property Name | Format-Table -AutoSize |
Via Active Directory Schema console (regsvr32 schmmgmt.dll > Start > Run > mmc > Add/Remove Snapins > Active Directory Schema)
To see properties of another class, example the Computer class:
1 2 3 4 5 6 |
#requires -Version 1 Get-ADProperty -Class Computer | Select-Object -Property Name, Syntax, IsIndexed, IsSingleValued, IsInGlobalCatalog, RangeLower, RangeUpper | Sort-Object -Property Name | Format-Table -AutoSize |
Active Directory Classes
https://msdn.microsoft.com/en-us/library/windows/desktop/ms680938(v=vs.85).aspx