ObjSearcher using -like on a variable

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

That filter is processed by AD, not PowerShell, and so -like (or any other shell operator) isn’t valid. But * is a valid wildcard; see if http://stackoverflow.com/questions/9564120/using-wildcards-in-ldap-search-filters-queries doesn’t help.

thanks Don, was trying to edit someone else’s code, not really sure why he had the + preceeding and trailing the values…

but managed to have this work:
$strFilter = “(&(objectCategory=User)($SCriteria=*$SValue))”

thanks