troubleshooting Question

Passing credentials through NET USE without hard coding the password?

Avatar of SeeDk
SeeDk asked on
Windows Server 2008* RobocopyWindows BatchWindows OS
8 Comments2 Solutions1236 ViewsLast Modified:
What I am trying to do is setup a scheduled job that copies files from a server not joined to the corporate domain to a server that is in the domain.
I am using robocopy.

It would be very easy to do:

net use \\IP\c$ /user:myuser mypassword

robocopy C:\mydir "\\IP\c$\copydir" /copyall

Open in new window

But I do not want to leave the password to this account hardcoded in a .bat file. Is there a more secure way I can store and pass credentials to the domain computer?
"Batchelor", Developer and EE Topic Advisor

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2015

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros