This exports the information on the screen. I cannot figure out how to pipe it back to the CSV so the new information appears in the row with the other information.
I have been struggling with this for a few weeks and cannot find an answer.
So, right now, all you’re outputting to the pipeline is the DN, which comes from the output of Get-QADUser. To select additional information, you’d need to include those properties in your Select command. The Select command will not have access to the information from the original CSV - it will only have access to what is output by Get-QADUser.
If you need your final CSV to include information from both the original CSV, and from Get-QADUser, then a one-liner is going to be an awkward way to do that. You would be better moving to a more script-based approach.
Given that information, what’s the direction, and your next question?
Something like that, approximately. The idea is to get your input data into a variable ($line) so that it can be re-used along with other data. To create the output, I used a hashtable construct, which is simplistic but should work for you.