Possibility to grab user's first and last name from active directory

calgia 21 Ansehenspunkte
2024-02-28T13:32:28.4766667+00:00

Hello Some software we use, set's at HKCU some key, based on settings you can input trough a GUI. At one field, always the users first name and the users last name is inserted. Can i grab directly from active directory the user's first and or last name to put there? Greetings,

Windows
Windows
Eine Familie von Microsoft-Betriebssystemen, die auf PCs, Tablets, Laptops, Smartphones, Internet-of-Things-Geräten, eigenständigen Mixed Reality-Headsets, großen Bildschirmen für die Zusammenarbeit und anderen Geräten ausgeführt werden
38 Fragen
Active Directory
Active Directory
Eine Reihe verzeichnisbasierter Technologien, die in Windows Server enthalten sind
10 Fragen
0 Kommentare Keine Kommentare
{count} Stimmen

1 Antwort

Sortieren nach: Sehr hilfreich
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 32 741 Ansehenspunkte Microsoft Vendor
    2024-02-29T04:22:17.74+00:00

    Hi calgia,

    You can export AD users to a CSV file on the DC using some PowerShell command like

    $users = @("user1","user2")
    $users| ForEach-Object {
        Get-ADUser -Identity $_ -Properties GivenName
    }|Export-Csv C:\temp\user.csv
    

    On the clients the first and last name in the exported CSV file can be added to the registry using the New-ItemProperty cmdlet.

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-itemproperty?view=powershell-7.4

    Best Regards,

    Ian Xue


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