Search feature in Active Directory

When using the search feature in Active Directory to find a user, computer, etc., after the search returns the results, why isn't there a way to see what OU the object is in? Or is there and I am missing it?  The only way I get around it is when the search finds the object, I move it to an OU so I now know where it is, then move it again to the OU I want it in.  I have to believe there is an easier way than what I am doing.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hedley PhillipsOwnerCommented:
I think you can do it using the dsget command. Let me find some more info for you.
Hedley PhillipsOwnerCommented:
Here you go:


dsquery user domainroot -name John*

and that will give you the following output:

"CN=John J. Phillips,OU=Reigate,DC=companyname,DC=local"
"CN=John Phillips,OU=Nutfield,DC=companyname,DC=local"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mr-Madcowz solution will work if you want to use the command line.

But another solution for you... if you are doing your search in Active Directory Users and Computers... on the VIEW menu, turn on the "Advanced Features" line. Then open the item you searched for, and you will see a new tab called "Object". That will show you the current location for the object.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Hedley PhillipsOwnerCommented:

ah, that is much better.

Forget my comments
National-LumberAuthor Commented:
Hey, two solutions are better than one!!  Thanks again!
Agreed... there are other ways I can think of also to get this information. I do use dsget and dsquery at times also, but it all comes down to what you are looking for, whether it needs to be automated, and how many objects you want to find. If you want to dump information for a whole domain or OU, then the command line tools are obviously better than clicking on each object and opening the tab.
Hedley PhillipsOwnerCommented:
The main thing here is that I have learnt something new as well... which is great.

Thanks for points & have a good w/end guys.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.