Can Active Directory export lists and flip users' first names with their last names?

Sam Hagos 20 Reputation points
2023-01-18T00:14:58.92+00:00

Hi,

So I've got an Excel file with a bunch of people's names. They're all employees of my company. Their names are organized by "last name, first name." I've been tasked with getting lists of all employees' names in active directory. I know how to generate and export .CSV lists, but those lists will have their names exported as "first name, last name", presumably because that's how they appear in active directory. Is there any way to generate those lists with the last names and then the first name? Preferably with a comma in between those names? Thanks for your time.

Windows for business Windows Client for IT Pros Directory services Active Directory
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-01-18T03:13:55.2066667+00:00

    Hi,

    You can give a try to some PowerShell script like this

    Get-ADUser -Filter * | Select-Object surname,givenname | Export-Csv -Path C:\temp\names.csv -NoTypeInformation
    
    

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.