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.