I have some working code that looks like this:
$strFilter = “(&(objectCategory=User)(”+$SCriteria+“=”+$SValue+“))”
$objSearcher.Filter = $strFilter
using this in some ad searching functionality, what I’m trying to do is on the second = in strfilter IE the criteria matching supplied value, to change to -like
most common use on this piece is searching ad accounts for an employee id field, where users can have multiple accounts, the primary having a letter preceeding a string of digits, and the secondary account only has the digits.
right now I can only search on specific values, I need to be able to do a -like $SValue
I know this is a bit rambling but any assistance would be appreciated