DSQuery for DN (distinguished name)

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 13 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
pr0digalson
Posts: 1
Last visit: Tue Jun 22, 2010 3:31 am

DSQuery for DN (distinguished name)

Post by pr0digalson »

Greetings. First time member here.I've had relative success with DSQUERY in the past on various tasks, but for some reason I can't quite get my arms around running a DSQUERY for a domain's 'distinguished name' only. Any idea on how to use DSQUERY to query for *just* the distinguished name of a domain? Thanks so much in advance.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

DSQuery for DN (distinguished name)

Post by jvierra »

No - that is not what dsquery is for. It can target a domain and return information on objects in teh domain but not the domain itself.

You can get the current domain here:
echo %userdnsdomain%

This topic is 13 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked