Get-ADUser whole forest

Sorry if this is what was answered earlier, but I have searched for days and cannot find anything similar to what I am looking for (which is incomprehensible because it looks like the simplest query).

I have a script that keeps track of a delegate tree (irrelevant) and within it, I need to be able to reliably execute Get-ADUser for a specific user across the entire directory, and I haven't found a way to do it but that doesn't involve 100 lines of code. We have four domains in our forest:
na.ds.company.com
la.ds.company.com
ea.ds.company.com
ap.ds.company.com

Why is it so easy to do in ADUC and so hard to do in Powershell?

+3


source to share


1 answer


I fixed it by pointing the GC to the root directory and the GC port on that DC (3268). I've tried this before, but I think the problem is that the GC I was trying was not located at the root. The team finished:



Get-ADUser <userID> -Server <GC located in root>:3268

      

+1


source







All Articles