Solved

DSCommands

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

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 is around source server preparation. No migration is an easy migration, there is a…
Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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…

786 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