Reputation: 145
Sorry if this is something that has been answered before but I've been searching for days and cannot find anything like what I'm looking for (which is baffling because it seems like the simplest request).
I have a script that traces a delegate tree (irrelevant) and within it, I need to be able to reliably execute Get-ADUser for a specific user against the entire directory and I have not found a way to do this yet 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 this so simple to do in ADUC and so hard to do in Powershell?
Upvotes: 3
Views: 31602
Reputation: 145
I fixed it by referencing a GC domain controller in the root directory and the GC port on that DC (3268). I tried this before but I think the problem was that the GC I tried was not located in the root. The command ended up being:
Get-ADUser <userID> -Server <GC located in root>:3268
Upvotes: 7