This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
We answered this question already here: https://social.technet.microsoft.com/Forums/windowsserver/en-US/ab4f0593-1d9c-4a43-ab07-8079ad4cf872/powershell-export-usersname-and-computernames?forum=winserverpowershell#8881a0fa-5ed8-45f8-aa68-3edf7d1465d8
The answer won't change just because you reworded the question.
\_(ツ)_/