Hi @create share ,
using PowerShell this should be possible.
Maybe these links are helpful:
https://www.alitajran.com/export-ad-users-to-csv-powershell
https://learn.microsoft.com/en-us/answers/questions/963471/get-base-ou-name-for-a-list-of-users.html
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten