Ask Your Question
0

How can I obtain the samaccount name using the display name when the filter is not identified?

asked 2023-07-20 11:01:05 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-07-20 11:30:01 +0000

nofretete gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-20 11:01:05 +0000

Seen: 9 times

Last updated: Jul 20 '23