Active directory filtering

Mohamed ElWakil 1 Reputation point
2022-11-23T08:38:43.227+00:00

Hello ,

How to select the users who have two different emails in the active directory?

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

1 answer

Sort by: Most helpful
  1. JimmySalian-2011 42,491 Reputation points
    2022-11-23T10:16:26.367+00:00

    Hi,

    So are you looking for exporting users with email address attribute? Try this code Get-ADUser -Filter * -Properties EmailAddress,DisplayName, samaccountname| select EmailAddress, DisplayName

    Hope this helps.
    JS

    ==
    Please Accept the answer if the information helped you. This will help us and others in the community as well.

    0 comments No comments

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.