Multiple choice technology

Which object needs to be created in PowerShell to search users in Active Directory (ADSI)?

  1. DirectoryServices.SearchResult

  2. DirectoryServices.DirectoryEntry

  3. DirectoryServices.DirectorySearcher

  4. DirectoryServices.SearchResultCollection

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

DirectoryServices.DirectorySearcher is the ADSI object used to search Active Directory. SearchResult represents a single result, DirectoryEntry represents an AD object, and SearchResultCollection is a collection of search results.