1 | initial version |
You can use the following PowerShell command to obtain the samaccount name using the display name:
Get-ADUser -Filter {DisplayName -eq "Display Name"} | Select-Object SamAccountName
Replace "Display Name" with the actual display name of the user you want to find. This command will search for all users in the Active Directory with that display name and return their samaccount name.