At work, I often have to work with computers that are in a domain other than the domain of my work machine.
This often happens when you need to connect from a home or work machine to a TFS, VSS, shared folder or similar service located in another corporate network, such as a client’s network.
Everyone who has encountered a similar task knows that they have to constantly enter their login / password, every time they connect, for each individual service.

Not a problem when it needs to be done a couple of times, but when you work with it all the time - manual input of passwords starts to get annoying.
')
Decision number 1.For TFS, and similar services, which themselves do not offer to save the password:
We contact the machine via SMB \\ ip_or_name \, enter the login password, set the checkbox “remember password”.
A similar effect can be achieved in this way: start-> execute-> control userpasswords2 -> Advanced -> Password Management.
Solution # 2 is quick and simple, but there are two nuances:
1) it does not always work
2) when accessing another resource in the same domain, you still have to enter the password.
Decision number 2runas / netonly!
As it turned out, windows allows a process to have several SSIDs, i.e. allows you to be "logged in" simultaneously under multiple users!
Thus, we can be simultaneously logged on to the local machine, under a local account, and on a remote (or remote domain)!
When a process accesses a local resource, the credentials of the local account are used; when accessing a domain, the domain rights are used.
And now a little magic:
killall /F /IM explorer.exe
runas /netonly /user:\_ explorer.exe
We run this script after booting the system, and we have an explorer that is simultaneously authenticated both on the local computer and in the domain!
Since SSIDs and access rights are inherited by child processes, having done such a simple manipulation, we can log in once in the domain and on the local computer and forget about entering the password right before the reboot.
Decision number 2 saves me 10-15 minutes a day, because I have to access remote resources frequently. And you?
Additional links on the topic:
http://msmvps.com/blogs/martinzugec/archive/2008/06/03/use-runas-from-non-domain-computer.aspxhttp://msdn.microsoft.com/en-us/library/ms682434(VS.85).aspx