Windows: Query Active Directory Site information

Hi,

short post today:-)

nltest is a builtin tool in Windows to query lots of AD information.

Query the computers current site

D:> nltest.exe /DSGETSITE
mysite
The command completed successfully

Query the current site another computer belongs to


D:> nltest /DSADDRESSTOSITE:notmycomputer

Get the site-subnet mapping for 'notmycomputer' from '\\dc1.yourdomain.net'.
   10.254.1.34  remotesite  10.254.1.0/24

The command completed successfully

And query to which site an IP Address belongs


D:> nltest /DSADDRESSTOSITE:10.254.1.34

Get the site-subnet mapping for '10.254.1.34' from '\\dc2.yourdomain.net'.
   10.254.1.34  remotesite  10.254.1.0/24

The command completed successfully

Get next DC by AD query

D:>nltest /DSGETDC:yourdomain.net /SITE:mysite

Get next DCs by DNS query

D:>nltest /DNSGETDC:yourdomain.net /SITE:mysite

Michael

Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.