我试图找到活性名录的特性:
$strFilter = "(&(objectCategory=User))"
$objDomain = New-Object System.DirectoryServices.DirectoryEntry
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.PageSize = 1000
$objSearcher.Filter = $strFilter
$objSearcher.SearchScope = "Subtree"
$colResults = $objSearcher.FindAll()
foreach ($objResult in $colResults){
$objItem = $objResult.Properties
我可以称之为“objitem.name”,但我不知道我可以找到哪些其他财产。
我如何能找到我能从“obj”项目获得哪些财产?
edit:
Used this solution using the answers below:
foreach ($objResult in $colResults){
($colResults)[0].Properties.PropertyNames
}