Score:0

Windows Active Directory - Change Time Server Settings after PDC/FSMO moved

es flag

We have configured a GPO to configure our PDC server like is described here (and many other blogs) https://docs.microsoft.com/en-us/archive/blogs/nepapfe/its-simple-time-configuration-in-active-directory

It means that our GPO uses the filter that applies only to main PDC to set NTP settings as primary time source in our AD Domain. Select * from Win32_ComputerSystem where DomainRole = 5

When FSMO roles are moved to another DC, these time/ntp settings are applied to new DC that acts as PDC. But after the role is moved, the old PDC is still configured with OLD ntp/time settings.

To correct that situation we are applying this manual command in the OLD PDC w32tm /config /syncfromflags:domhier /update

But we would like to do it automatically, how can we do it? , how can we automatically reset the previous settings that still remains on the OLD PDC ?

Thanks in advance

LeeM avatar
cn flag
If an answer worked for you, it'd be helpful to accept it as the answer and/or upvote it
Score:0
cn flag

Ugh, I keep meaning to write a blog post that corrects some of the poor formatting and phrasing in that article. And some of the other misconceptions I've seen elsewhere about configuring an NTP time source.

To cut to the chase - there are actually TWO GPOs you need to create. The first one is scoped to the PDCE with the WMI filter and the NTP time source config, as you've done.

The second one is mentioned under Creating a global settings GPO in that article. As says, in a different GPO to the PDCE one, enable Global Configuration Settings under Computer Configuration\Administrative Templates\System\Windows Time Service\Time Providers and you can simply leave the defaults.

This second GPO to enable the "default" time setting needs to be applied in a group policy for all DCs. Ensure the GPO that contains the default time config is a lower precedence than the PDCE one.

Ordinarily, if you have a Default Domain Controllers policy linked to the Domain Controllers OU, you can simply enable the basic Global Configuration Settings for Windows Time in there. The custom GPO for the PDCE takes care of the NTP time config when the role is shifted, and the "default" one will revert the time setting for the old PDCE.

Make sure, of course, that your GPO link ordering is correct in the OU - again, your custom PDCE time policy GPO should have a higher precedence than the default DC policy.

If you want to create a custom GPO linked to the Domain Controllers OU for the default time config, that works too. It's just a little more overhead creating a separate GPO if you've already got a default DC policy. Again, such a custom GPO should also have a lesser precedence than the PDCE one.

I find in the real world, it takes < 5 mins in a well-connected environment for the PDCE to get its new time config (or a GPRefresh to speed it up), while the previous PDCE takes a little longer to revert to the domain hierarchy, depending on the GP refresh time. A slight delay for the previous PDCE to catch up is fine.

Score:-2
cv flag

Moving the FSMO roles is an event that should occur very rarely, either when you retire the existing FSMO role holder or because the current FSMO role holder is having problems. As such, there would be no need for a solution for this because you'd be removing the current FSMO role holder altogether.

Moving the FSMO roles while leaving the current FSMO role holder active is an even rarer event and so this appears to be a solution looking for a problem.

es flag
In the company that we work, they do some periodically DRP and we would like to avoid any extra manual step to avoid possible mistakes that already happened in the past.
LeeM avatar
cn flag
This is 100% incorrect. It is normal and in fact *highly recommended* to gracefully **transfer** FSMO roles before maintenance activity (such as patching) on a FSMO roleholder. If the FSMO roleholder has an outage due to the maintenance, then you may need to **seize** the roles onto another DC, which should should indeed be a rare occurrence. The PDCE in particular is important to transfer during maintenance - it synchronises time in the domain and triggers replication cycles. No PDCE = no replication and time drift. *Always* transfer FSMOs before maintenance and check NTP on the new PDCE.
joeqwerty avatar
cv flag
@LeeM **It is normal and in fact highly recommended to gracefully transfer FSMO roles before maintenance activity (such as patching) on a FSMO roleholder** - I'd challenge you to cite any Microsoft documentation supporting your claim. Nobody has ever transferred the FSMO roles due to patching or routine maintenance.
LeeM avatar
cn flag
@joeqwerty - dude, are you serious? What happens if you have an outage on your PDCE due to maintenance? How long are you prepared to go while replication is not functioning in your domain or password changes? You can go without Domain Naming Master for a while if you're not building new DCs or child domains or Infrastructure Master in single-domain forests or all DCs are GCs. Even the schema master, if you're not patching Exchange or other schema changes. Not so much the others or the NTP master.
LeeM avatar
cn flag
As for the "citation please", if lMSFT advice and commonly-accepted best practice since the year 2000 isn't good enough for you, please read: *We recommend that you transfer FSMO roles in the following scenarios: ...The DC that currently owns FSMO roles is being taken offline for scheduled maintenance, and you have to assign specific FSMO roles to live DCs.... This is especially true for the PDC Emulator role....* https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/transfer-or-seize-fsmo-roles-in-ad-ds#determine-when-to-transfer-or-seize-roles
LeeM avatar
cn flag
One more thing - do you understand the difference between *transfer* and *seize*? If you actually mean the latter, you're correct. You don't run around *seizing* roles except as a last resort. As for "Nobody has ever transferred the FSMO roles due to patching...", wow, apparently scores of colleagues and I since AD existed are "nobody".
joeqwerty avatar
cv flag
Nobody I know, ever knew. worked with, or otherwise was aware of has ever transferred FSMO roles during routine patching of the FSMO role holder (note I used the word transfer, not seize... just as I used it in my earlier comment).
LeeM avatar
cn flag
I suggest you change your operational procedures per the recommended practice. I've worked in one place (out of 8 med-large ones) where I had to implement maintenance FSMO moves for the first time - state governments get annoyed when none of their 20K+ employees can change their passwords nor many logon remotely bc of time drift on workstations from a long outage of the "FSMO DC" (incl PDCE) during routine patching (it was stupidly done over the holiday period). I was hired within 2 months of the outage - it didn't happen again. You've been *lucky*, small environments or not.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.