I have a home computer that I occasionally need to work at. I do this by using VPN to connect to my company network, and this generally works fine. My home computer is not a member of the Windows domain on the remote network.
Sometimes, I need to connect to a SQL server on the work network using trusted connection. This fails, even though my account at home has the same name and password. I found this question, that suggests changing the account for *Session in the Windows Credentials Manager. This works, but it is a manual process.
Is there any way to change the account for *Session automatically, or via a script, when the VPN connection is dialed ?