Hi, This should get your started.
Import-Csv -Path .\names.csv | ForEach {
$Filter = "displayname -like $([char]34+[char]42+$($_.ManagerFullName)+[char]42+[char]34)"
Get-Aduser -Filter $Filter
}
The filter is built up separate to capture the ManagerFullName with " before and after the name, and to include * before and after to allow it to search for all - "searching_for"
Someone else might be able to suggest a cleaner way to formulate the Filter but I started to do it using [Char] as this generally gives me less trouble when formulating strings with lots of " or ' within them.
As this search is based on partial match, depending on your AD size you may get multiple results for common surnames. You don't mention it but if you always have access to the email address in the CSV, would searching against that be better as its likely to give unique results?