I was creating a scheduled task to copy log files from DMZ server to a server that existed behind a firewall but I ran into a few difficulties.
My first problem was that I had to pass credentials from the DMZ to the user domain.
My second was to change permissions so that the user that was running the scheduled task could access and grab all the files.
I initially started Xcopy and Run As. but unfortunately I could not save my credentials. In the past I often use CPAU.exe. This worked very well for copying. But I did not want to use a third party product to copy from server to server.
As for Xcopy it was not robust enough for the repetitive task. I knew there was a better way so I did some research.
I ran across this article https://klyavlin.wordpress.com/2012/09/19/robocopy-network-usernamepassword/. All I had to do to pass credentials from one domain to the other and copy was to use a user from the user domain and then use robocopy to mirror the source directory in the DMZ to the user domain. I created a share on the source log file folder to make the task easier.
My first problem was that I had to pass credentials from the DMZ to the user domain.
My second was to change permissions so that the user that was running the scheduled task could access and grab all the files.
I initially started Xcopy and Run As. but unfortunately I could not save my credentials. In the past I often use CPAU.exe. This worked very well for copying. But I did not want to use a third party product to copy from server to server.
As for Xcopy it was not robust enough for the repetitive task. I knew there was a better way so I did some research.
I ran across this article https://klyavlin.wordpress.com/2012/09/19/robocopy-network-usernamepassword/. All I had to do to pass credentials from one domain to the other and copy was to use a user from the user domain and then use robocopy to mirror the source directory in the DMZ to the user domain. I created a share on the source log file folder to make the task easier.