We recently moved from an SBS2003 domain to one with Windows Server 2012R2. This machine is our DC and acts as a fileserver as well. Our client machines are all running Windows 7.
I have had a scheduled task on my machine for a number of years, which ran just fine. It executes some code in a MS Access database. The initial portion of the code is running fine. It has access to the back-end database on the remote server and updates everything within the database as expected. It also creates and writes to a local file as expected.
However, it is stopping when it gets to the steps that write files to the remote server share (same server on which the back-end .mdb is housed). It creates the empty text file as I can see it with 0KB, but then fails to write anything to it. The file is being referenced by it's path "\\server\share\directory\filename.txt" and not a mapped drive.
The task is set to use the domain admin account, without needing to be logged in, and with the highest privileges. This user account has all the appropriate share, directory, and file permissions on the remote server and it has been granted Batch Logon rights on the remote server. It is not in the list of accounts that are denied these rights.
If I manually run the task from the task scheduler while I'm logged (and the computer is unlocked) in under my account, it runs fine.
If I change the scheduled time to run while I'm logged in during the day, it runs just fine.
However, when it is supposed to run at night, I encounter this problem. I am still logged in, but the computer will be locked at this time. Again, this ran without issue on the old server.
I can only assume it's a permissions issue, but cannot figure out why it works when I'm logged in to the client machine using my own login. I've been Googling myself to death trying to find a solution, but have not made any progress. Any help would be greatly appreciated.
Thanks, Paul