Search all users in AD forest

I want to be able to search all users in my windows forest rather than changing domain and searching. Is this possible?
Who is Participating?
MaheshConnect With a Mentor ArchitectCommented:
from ADUC open "find" window and select "Entire Directory" as search scope and the do custom search for users based on any AD attribute like SamAccountName or UPN etc
Note that your DNS infrastructure must be healthy so that you can connect to all domains in forest, otherwise you will end up with connectivity errors
you need to execute this search from PDC master server of forest root domain as this server normally would have end to end connectivity with all other domains PDC server
U may start saved query from ADUC so that you can export results if required
Jose Gabriel Ortega CCEO J0rt3g4 Consulting ServicesCommented:
$Tdomains=Get-ADForest | select domains
foreach($dom in $Tdomains.domain){
    Get-ADUser -Server <servername> -Filter {EmailAddress -like "$dom"} -Properties EmailAddress

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.