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

Jerold Schulman

July 19, 2006

1 Min Read
ITPro Today logo

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 offsetlocalif {%1}=={} @echo Syntax: LTSInterval Days&endlocal&goto :EOFset wrk=%1set /a days=%wrk%if "%days%" NEQ "%wrk%" @echo Syntax: LTSInterval Days&endlocal&goto :EOFcall DomainDN DNadmod -b %DN% "msDS-LogonTimeSyncInterval::%days%"endlocal

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like