Solved

DSCommands

Posted on 2014-01-15
2
114 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found listed in my profile here: http:…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
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…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

932 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

12 Experts available now in Live!

Get 1:1 Help Now