{"id":5786,"date":"2018-10-01T23:12:48","date_gmt":"2018-10-01T21:12:48","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=5786"},"modified":"2018-10-24T12:18:14","modified_gmt":"2018-10-24T10:18:14","slug":"active-directory-command-line-to-get-all-subnets-for-a-site","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/active-directory-command-line-to-get-all-subnets-for-a-site\/","title":{"rendered":"Active Directory: Command line to get all subnets for a site"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_5786 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_5786')){$('.twoclick_social_bookmarks_post_5786').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Active%20Directory%3A%20Command%20line%20to%20get%20all%20subnets%20for%20a%20site\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Athis%20post%20describes%20the%20command%20line%20to%20get%20a%20list%20of%20all%20subnets%20for%20an%20Active%20Directory%20Site.%20The%20ds%2A%20commands%20are%20part%20of%20the%20Active%20Directory%20tools%20on%20Server%20and%20of%20RSAT%20Tools%20on%20Windows%207-10.%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\\\/active-directory-command-line-to-get-all-subnets-for-a-site\\\/\",\"post_id\":5786,\"post_title_referrer_track\":\"Active+Directory%3A+Command+line+to+get+all+subnets+for+a+site\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>this post describes the command line to get a list of all subnets for an Active Directory Site. The ds* commands are part of the Active Directory tools on Server and of RSAT Tools on Windows 7-10.<br \/>\n<!--more--><br \/>\nSearch for a site<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; dsquery site -desc *mySite*\r\n<\/pre>\n<p>Or simple list all sites<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; dsquery site\r\n...\r\n&quot;CN=mySite,CN=Sites,CN=Configuration,DC=mySubDomain,DC=Domain,DC=org&quot;\r\n...\r\n<\/pre>\n<p>Or get the sitename of your computer<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; nltest.exe  \/DSGETSITE\r\n<\/pre>\n<p>And list all subnets<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ndsquery subnet -site &quot;mySite&quot;\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, this post describes the command line to get a list of all subnets for an Active Directory Site. The ds* commands are part of the Active Directory tools on Server and of RSAT Tools on Windows 7-10.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1265,5],"tags":[101,45,1241,1240,794,612,20],"class_list":["post-5786","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-windowsknowhow","tag-active","tag-directory","tag-get-current-site","tag-list-subnets","tag-search","tag-site","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5786","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=5786"}],"version-history":[{"count":4,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5786\/revisions"}],"predecessor-version":[{"id":5791,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5786\/revisions\/5791"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=5786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=5786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=5786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}