{"id":2544,"date":"2015-02-23T22:06:01","date_gmt":"2015-02-23T21:06:01","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=2544"},"modified":"2019-07-01T11:16:50","modified_gmt":"2019-07-01T09:16:50","slug":"windows-query-active-directory-site-information","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-query-active-directory-site-information\/","title":{"rendered":"Windows: Query Active Directory Site information"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_2544 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_2544')){$('.twoclick_social_bookmarks_post_2544').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Query%20Active%20Directory%20Site%20information\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ashort%20post%20today%3A-%29%0D%0A%0D%0Anltest%20is%20a%20builtin%20tool%20in%20Windows%20to%20query%20lots%20of%20AD%20information.%20%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-query-active-directory-site-information\\\/\",\"post_id\":2544,\"post_title_referrer_track\":\"Windows%3A+Query+Active+Directory+Site+information\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>short post today:-)<\/p>\n<p>nltest is a builtin tool in Windows to query lots of AD information.<br \/>\n<!--more--><br \/>\nQuery the computers current site<br \/>\n<code><br \/>\nD:> nltest.exe \/DSGETSITE<br \/>\nmysite<br \/>\nThe command completed successfully<br \/>\n<\/code><br \/>\nQuery the current site another computer belongs to<\/p>\n<pre><code>\r\nD:> nltest \/DSADDRESSTOSITE:notmycomputer\r\n\r\nGet the site-subnet mapping for 'notmycomputer' from '\\\\dc1.yourdomain.net'.\r\n   10.254.1.34  remotesite  10.254.1.0\/24\r\n\r\nThe command completed successfully\r\n<\/code><\/pre>\n<p>And query to which site an IP Address belongs<\/p>\n<pre><code>\r\nD:> nltest \/DSADDRESSTOSITE:10.254.1.34\r\n\r\nGet the site-subnet mapping for '10.254.1.34' from '\\\\dc2.yourdomain.net'.\r\n   10.254.1.34  remotesite  10.254.1.0\/24\r\n\r\nThe command completed successfully\r\n<\/code><\/pre>\n<p>Get next DC by AD query<br \/>\n<code><br \/>\nD:>nltest \/DSGETDC:yourdomain.net \/SITE:mysite<br \/>\n<\/code><\/p>\n<p>Get next DCs by DNS query<br \/>\n<code><br \/>\nD:>nltest \/DNSGETDC:yourdomain.net \/SITE:mysite<br \/>\n<\/code><br \/>\n<!-- http:\/\/blogs.msdn.com\/b\/adpowershell\/archive\/2009\/08\/18\/active-directory-powershell-to-manage-sites-and-subnets-part-3-getting-site-and-subnets.aspx --><\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, short post today:-) nltest is a builtin tool in Windows to query lots of AD information.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[614,613,611,612,20],"class_list":["post-2544","post","type-post","status-publish","format-standard","hentry","category-windowsknowhow","tag-active-directory-site","tag-ipaddress-to-site","tag-query","tag-site","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=2544"}],"version-history":[{"count":7,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2544\/revisions"}],"predecessor-version":[{"id":6498,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2544\/revisions\/6498"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=2544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=2544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=2544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}