1

Is it possible to change the date of a computer that is attached to a domain and have it stick? I've researched this for a few days and haven't found anything confirming or denying that this is possible. The computer we have is Windows 10 and the domain controller is Windows Server 2012 R2. I can provide more details if needed.

Thanks.

ryol
  • 35
  • 1
  • 2
  • 4
  • 2
    What problem do you want to solve with this? – Sven Sep 13 '16 at 19:58
  • 2
    If the clock off-set between computers in the domain is more than a 5 minutes your Kerberos based authentication will fail... – HBruijn Sep 13 '16 at 19:59
  • 3
    @Sven Usually, people who want to do this are trying to _create_ a problem, not _solve_ a problem. So...what problem do you want to create with this? – Michael Hampton Sep 13 '16 at 20:03
  • @Sven We would like to advance the date when we run an accounts receivable aging report. – ryol Sep 13 '16 at 21:16
  • @HBruijn 5 Minutes? I had found that it would fail after 5 months...maybe that poster had mistyped since yours sounds way more likely. – ryol Sep 13 '16 at 21:18
  • `Is it possible to change the date of a computer that is attached to a domain and have it stick?` - Not really (practically speaking). `We would like to advance the date when we run an accounts receivable aging report` - That sounds a bit on the shady side. – joeqwerty Sep 13 '16 at 21:21
  • Since people asked for a use case for this: We needed to simulate an (external) certificate expiring on a development machine, to see if our software would react as expected. Granted, a separate test machine would be more suitable for that, but since the certificate is stored on external, dedicated USB hardware, we couldn't just fire up a VM. – Heinzi Dec 07 '21 at 15:33

2 Answers2

6

It's not recommended for a lot of reasons, but here is how to:

First, unregister your time service to not resync. On elevated prompt run:

W32TM /unregister

Then, change set the time you want using the command time and date:

time 05:23:00 AM
date 5/15/2009

Rollback:

W32TM /register
W32TM /resync

Source:
http://ss64.com/nt/w32tm.html
http://www.wikihow.com/Change-the-Computer-Time-and-Date-Using-the-Command-Prompt

Edit: Corrected rollback command.

Butters
  • 105
  • 5
Felipe Donda
  • 476
  • 2
  • 8
  • 3
    Are you sure those "rollback" commands are right? ... from what I can gather they should be "w32tm /register" then "w32tm /resync" (not unregister). On my PC, because I had not restarted the system between manually setting time and re-enabling time service, I got an error about the service being marked for deletion. It was necessary to manually stop the windows time service before running the "w32tm /register" command, then it worked and everything seems to be back to domain time again. – Daniel Scott Jul 05 '19 at 09:20
  • What Daniel Scott said. If you want to script it, it's `net stop w32time` and then, after `w32tm /register`, `net start w32time`. – Heinzi Dec 07 '21 at 15:30
0

Why in the world would you want to change the date on a domain-joined computer?

Anyway, yes, you can do that, but any form of domain authentication would automatically fail, because Kerberos really doesn't like that.

If you want to simulate a later date on your own computer, that's fine.
But don't try that in a domain.

Massimo
  • 70,200
  • 57
  • 200
  • 323