Answered by:
Connection between two server failing And Windows scheduler not working properly

Question
-
I have this scenario
1. Server 1 is in the "EX1" domain using "EX1/User.test" to login
2. Server 2 is in the "RT1" domain using "RT1/RT_User.test" to login
Both server does not trust each others, for security concerns, that's the way we are.
We created a network path on Server 1 to be accessed by "EX1/User.test" from Server 2, and it works, when I save the credentials on Windows Credentials Manager.
Then, we create a script which will be pushing files from Server 2 to Server 1, when I run the script manually it works good, but once we add this script to windows scheduler it fails
1. Seems like windows scheduler is using the local user instead of the one stored on windows credentials, and did not find a way to change due to the other domain is not accessible/visible
2. I proceed to create a c# app, using the local user, I read the file and convert to a stream reader, and making Impersonation, login to server 2 using the credentials for it, and still failing, the error is "Bad user or wrong password", seems like it's not accessing the other domain some way like windows does.
Any suggestion ?
- Moved by Xingyu ZhaoMicrosoft contingent staff Monday, August 17, 2020 2:06 AM
Friday, August 14, 2020 4:49 PM
Answers
-
I'd try asking for help over here.
https://docs.microsoft.com/en-us/answers/topics/windows-server.html
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Marked as answer by _memojuass Monday, August 17, 2020 7:53 PM
Monday, August 17, 2020 6:59 PM -
The problem was solved using power-shell script instead of batch script. Same thin, but for some reason windows power shell get the credentials from the right place.
- Marked as answer by _memojuass Monday, August 17, 2020 7:55 PM
Monday, August 17, 2020 7:55 PM
All replies
-
Hi _memojuass,
Thank you for posting here.
In order to help you find the correct forum to go ask questions, I have moved the thread to 'Where is the forum for' forum.
Best Regards,
Xingyu Zhao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Monday, August 17, 2020 2:06 AM -
I'd try asking for help over here.
https://docs.microsoft.com/en-us/answers/topics/windows-server.html
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Marked as answer by _memojuass Monday, August 17, 2020 7:53 PM
Monday, August 17, 2020 6:59 PM -
The problem was solved using power-shell script instead of batch script. Same thin, but for some reason windows power shell get the credentials from the right place.
- Marked as answer by _memojuass Monday, August 17, 2020 7:55 PM
Monday, August 17, 2020 7:55 PM -
Glad to hear its sorted.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.Monday, August 17, 2020 9:02 PM