"Powershell" synchronizes the entire domain time consistent with Beijing times

Source: Internet
Author: User

The recent discovery of the entire domain was nearly 5 minutes later than in Beijing, and some applications outside the realm began to error when authenticating:

According to Microsoft, the internal clock for servers must is set to within of minutes of the domain controller ' s clock. If The clocks is not synchronized then Kerberos authentication would fail.

Taking into account that all server time in the domain is synchronized with the PDC, just set the PDC to synchronize with Beijing time, the whole domain can be synchronized, the following steps:

(1) The time.windows.com as the authoritative time source of the PDC;

W32tm/config/update/manualpeerlist:time.windows.com/syncfromflags:manual/reliable:yes

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://img1.51cto.com/attachment/201410/22/907015_14139753656aHB.png" height= "75"/ >

(2) Export the list of all servers in the domain from DNS and save them as CSV format files;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://img1.51cto.com/attachment/201410/22/907015_1413975365BbzT.png" height= "324"/ >

The collation file format is as follows:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://img1.51cto.com/attachment/201410/22/907015_1413975366TYRV.png" height= "456"/ >

(3) Manually execute PowerShell statements that match the server time in the domain with the PDC; (wait for completion)

$names =get-content D:\dn.csvforeach ($name in $names) {w32tm/resync/computer: $name}

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://img1.51cto.com/attachment/201410/22/907015_1413975367yjlx.png" height= "132"/ >

This article is from the "Margin with Wish" blog, please be sure to keep this source http://281816327.blog.51cto.com/907015/1566870

"Powershell" synchronizes the entire domain time consistent with Beijing times

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.