I am running a Build Job using Jenkins. The Jenkins job executes a command shown below that simply copies a test file from server A to server B. Jenkins resides on Server A and well as the command file. The Servers are running Windows Server 2008 R2.

copy C:\Users\myuser\test.txt" "\\ServerB\myfolder\test.txt"

The command fails with the error message:

There is a time and/or date difference between the client and server.

Jenkins uses the Windows account myuser. If you log onto ServerA as myuser and run the command, it works just fine.

The System Admin ran the command w32tm /resync on both servers. No effect.

If I change the command to copy to Server C instead, it works fine from Jenkins.

Tried rebooting Server B, no luck.

The times and timezones on the servers all look the same down to the second.

Any ideas on how to fix this this?

2 Answers 2


1 command:

net time /set

...on both the workstation and server. This will ensure that both have the proper time/date set (make sure time zones are set properly. Just because it says 4PM in the tray... does not mean 4PM in YOUR timezone.)


Our Sys. Admin fixed this for us. Here were the steps:

  1. Ran: w32tm /resync

  2. Disabled User Access Control. He did this by selecting Start > Run > msconfig > Tools > Change UAC Settings and lowering it to the Never Notify setting.

  3. Rebooted. Then the problem went away.

  • I was getting this error during a powershell remote session script and the only thing I had to do fix it was run the 1st command. I didn't even restart my powershell session and it immediately fixed the problem Oct 5, 2015 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.