I have a very small script that use to get a reverse info with a list of users in ADPS…
$csv = Import-csv "C:\My Scripts\list.txt" $error.clear() foreach($User in $csv) { $User = $User.User $User Get-QADUser $User | ft name,DisplayName,Email,PrimarySMTPAddress >> reverse_file.csv }… the problems come when, the list that some ask me to review doesn’t have the exact info. This make that the result file return me a false positive or in case that the username been ambiguous, it return 2 or more similar results.
How I can do to limit the query only to the value that is in the source file, and in case that the username doesn’t exist write “something”?