$de = New-Object System.DirectoryServices.DirectoryEntry $searcher = New-Object System.DirectoryServices.DirectorySearcher($de) $searcher.Filter = "(sAMAccountName=qatest13)" $result = $searcher.FindOne() $result.Properties
Also extremely useful, and from SysInternals, is Active Directory Explorer.
LDAP factors prominently in all of this. Someday I might like to have some confidence in what to use as a filter in the searcher. But for now, I'll settle for making a note about what works and not caring why.
(SAM-Account-Name)
No comments:
Post a Comment