Searching through Active-Directory on Windows 2008 Server Core R2
Written by Niklas Goude on January 17, 2009 – 5:01 pm
Searching through Active-Directory can be done using the DirectorySearcher. First we need to connect to Active-Directory.
PS > $Connection = “LDAP://Server1/DC=APA,DC=CORP”
PS > $AD = [adsi] $Connection
We then create a new object containing the Searcher.
PS > $Searcher = New-Object System.DirectoryServices.DirectorySearcher $AD
In order to search through Active-Directory we have to specify a filter that tells the searcher what [...]

