DirectoryServices.DirectorySearcher RRS feed

  • Question

  • Hello, I realize this is not regarding the system.data namespace but I couldn't find a forum for DirectoryServices. Hopefully though, someone can help me :-)


    When using the .Filter property something like the below works fine when searching for one value for an attribute.


    objSearch.Filter = "(&(objectclass=user)(objectcategory=person)(department=Finance))"


    But how do you filter on let's say mulitple department values? I tried the below but that does not work.


    objSearch.Filter = "(&(objectclass=user)(objectcategory=person)(department=Finance, Marketing))"


    Thanks in advance,



    Thursday, January 10, 2008 4:31 PM


All replies