{"id":734,"date":"2011-05-16T17:25:59","date_gmt":"2011-05-16T16:25:59","guid":{"rendered":"http:\/\/www.kozeniauskas.com\/itblog\/?p=734"},"modified":"2011-05-26T10:46:24","modified_gmt":"2011-05-26T09:46:24","slug":"how-to-point-a-client-to-different-domain-controller","status":"publish","type":"post","link":"https:\/\/www.kozeniauskas.com\/itblog\/2011\/05\/16\/how-to-point-a-client-to-different-domain-controller\/","title":{"rendered":"How to point a client to different domain controller"},"content":{"rendered":"<p>Here is a useful command that I&#8217;ve discovered.<br \/>\nImagine a situation where you have a domain called domain.local with multiple domain controllers DC0, DC1 etc.<br \/>\nFor some reason some clients are not working as expected or working slower. In my case it was when I tried to run gpresult \/r on some clients it was taking ages to provide full details. To find out if any of the domain controllers is having problems I wanted quickly to change the domain controller that the affected client is using.<br \/>\nBack in the day when Windows NT 4 ruled the world there was a command called setprfdc (set preferred domain controller) nltest does something similar.<\/p>\n<p>So first I wanted to find out what DC the client is using. Now there are many different ways but here is a command that I&#8217;ve used:<br \/>\n<em><strong>nltest \/dsgetdc:domain.local<\/strong><\/em><br \/>\n<!--more--><br \/>\nThe output was:<\/p>\n<p><em>DC: <a href=\"file:\/\/dc0.domain.local\/\">\\\\DC0.DOMAIN.local<\/a><\/em><br \/>\n<em>Address: <a href=\"file:\/\/10.10.10.1\/\">\\\\10.10.10.1<\/a><\/em><br \/>\n<em>Dom Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx<\/em><br \/>\n<em>Dom Name: DOMAIN.local<\/em><br \/>\n<em>Forest Name: DOMAIN.local<\/em><br \/>\n<em>Dc Site Name: Default-First-Site-Name<\/em><br \/>\n<em>Our Site Name: Interxion<\/em><br \/>\n<em>Flags: PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST<br \/>\n<\/em><em>The command completed successfully<\/em><\/p>\n<p>This means that the client is using DC0. Now I wanted quickly to point the client to a diferent domain controller DC1. To do that write the following command:<\/p>\n<p><strong><em>nltest \/Server:client0 \/SC_RESET:domain.local\\dc1<\/em><\/strong><\/p>\n<p>The output should be:<\/p>\n<p><em>Flags: 30 HAS_IP\u00a0 HAS_TIMESERV<\/em><br \/>\n<em>Trusted DC Name <a href=\"file:\/\/dc1.domain.local\/\">\\\\DC1.DOMAIN.local<\/a><\/em><br \/>\n<em>Trusted DC Connection Status Status = 0 0x0 NERR_Success<\/em><br \/>\n<em>The command completed successfully<\/em><\/p>\n<p>If you run the first command again you should see that domain controller has changed.<br \/>\nThis is a temporary thing as after some time the cleint will fallback to the original domain controller.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a useful command that I&#8217;ve discovered. Imagine a situation where you have a domain called domain.local with multiple domain controllers DC0, DC1 etc. For some reason some clients are not working as expected or working slower. In my case it was when I tried to run gpresult \/r on some clients it was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[374,372,373],"_links":{"self":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/734"}],"collection":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/comments?post=734"}],"version-history":[{"count":6,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/734\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/734\/revisions\/739"}],"wp:attachment":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/media?parent=734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/categories?post=734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/tags?post=734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}