Net use with a service account


I've got 2 Active directory domain, without trust, let's say domain A and domain B.

I've got a service account on domain A, running on Machine A

The service account A must access a share folder on domain B.

How can I map a netuse share, with credential of domain B (another service account in domain B) in the service A session context ?

It must be persistant.

Who is Participating?
mathias94Connect With a Mentor Author Commented:
Finally a used the credentials manager, it works.
but the script is another solution.

sr1xxonConnect With a Mentor Commented:
you need to create a one-way trust between domain a and domain b.


create credentials on domain b - in the net use, use
net use z: \\server\share user:/domainb\username /persistent:yes <pwd>

put this into a startup file if you need it persistent across reboots, without prompting for password.
mathias94Author Commented:
Credentials manager ok
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.