The results in the title attribute comes up as @{SAMACCOUNTNAME=fname.lname; Title=title}.title
The csv file only has the samaccountname and title as I thought I would make things easier for me to write up in this script but I do not know what I have written wrong under set-aduser for it to come up with the extra text.
Putting quotes around $u.title is causing it to be be expanded to $u + ‘.title’. $u is an object, so it’s showing the whole object and then appending ‘.title’. I think you can just remove the double quotes in this case, but if you need to do something like this in other cases, you need to force it to evaluate inside of the double quotes, like this.