get-aduser with filter involving two conditions

Hi guys, I’m trying to get the following line to work: foreach ($clientaccount in $(get-aduser -filter “givenname -eq ‘$usergivenname’ -and surname -eq ‘$userSurname'” -searchbase “,OU=Client Accounts,OU=Example,OU=Groups,DC=corp,DC=example,DC=net”)){ #do things in loop } I’ve verified that $usergivenname and $userSurname are defined and strings when that line runs. I consistently get: get-aduser : The object name has bad […]