Q. How do I alter the 14 day default interval which determines when the lastLogonTimeStamp is updated?

In tip 9800, I explaned that:

To minimize domain wide replication for every logon, lastLogonTimeStamp is updated periodically. The default interval is a random number from about 10 to 14 days, controlled by the domain's msDS-LogonTimeSyncInterval attribute, which defaults to 14 days, and a randomizer that prevents excessive replication when the domain functional level is first raised. Actual replication does not occurs until the first successful logon after the randomized msDS-LogonTimeSyncInterval value is reached.

Using AdMod.exe and DomainDN.bat, both of which must be located in a folder that is in your PATH, I have scripted LTSInterval.bat to alter the value of the msDS-LogonTimeSyncInterval attribute for the domain you are logged onto.

The syntax for using LTSInterval.bat is:

LTSInterval Days

Where Days is the value of msDS-LogonTimeSyncInterval you wish to set.

LTSInterval.bat contains:

@echo off
if \{%1\}==\{\} @echo Syntax: LTSInterval Days&endlocal&goto :EOF
set wrk=%1
set /a days=%wrk%
if "%days%" NEQ "%wrk%" @echo Syntax: LTSInterval Days&endlocal&goto :EOF
call DomainDN DN
admod -b %DN% "msDS-LogonTimeSyncInterval::%days%"

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.