Solved

DSCommands

Posted on 2014-01-15
2
113 Views
Last Modified: 2014-01-28
I will like to use dsquery or dsget command to find a DN for user.  I know I find this information from a machine using the current logon  %username% command.  But I like to use this command for a user who machine I am not login into.

This is command I know about  

dsquery * domainroot -filter "(samaccountname%username%)"


This command only works with the current logon users.    I will like to specify a different user and receive his DN.
0
Comment
Question by:JCJohnson76
2 Comments
 
LVL 5

Assisted Solution

by:alicain
alicain earned 250 total points
ID: 39783870
Hi,

We need to first find the user with a dsquery, then pipe that into a dsget command :
   dsquery user -name the_users_account_name_here | dsget user -dn

Regards,
Alastair
0
 
LVL 39

Accepted Solution

by:
footech earned 250 total points
ID: 39783893
It works even without piping to dsget.
dsquery user -samid someusername
0

Featured Post

Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now