Link to home
Start Free TrialLog in
Avatar of quippee
quippee

asked on

Computer account location in Active directory

We have a pretty big AD and have lots of OU by department and locations. if i search for a user or computer in the find window It does not tell me in what ou is located, I know there is a way to do seach AD and get the full dn path but its not working for me, does anyone know of  a command that can tell me where an ad object is located in AD.

Thanks
SOLUTION
Avatar of 2PiFL
2PiFL
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maxis2cute
maxis2cute

als to find just one computer at the end of my last post use -name d* will give you all computers that start with d

so an example is

dsquery computer dc=microsoft,dc=com -name n*
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of quippee

ASKER

Great Comments, I will try to spread the points :)
quippee, just for reference i usually use the command line or power shell to admin.  The reason is that once you become familiar with the command line you can always easily script them.

If you rely on the GUI, you become accustomed to that view and it is hard to go back to command line.

just my thoughts.

Avatar of quippee

ASKER

thats true, but for some reason it didnt work with users

dsquery computer dc=domain,dc=net -name pc01

worked
but

dsquery user dc=domain,dc=net -name jcarrie

just gave a blank line
That depends on whether "jcarrie" is actually the name of the user object in AD, or the user name (and since you're searching from the domain root anyway, you can just leave out the domain name, or replace it with domainroot, which is easier to type ...).
Anyway try
dsquery user "dc=domain,dc=net" -samid jcarrie
this microsoft link give many examples of dsquery and is worth taking a loook at

http://technet2.microsoft.com/windowsserver/en/library/46ba1426-43fd-4985-b429-cd53d3046f011033.mspx?mfr=true