Hi All,I have a set of SQL server Instances in another domain connected to my machine. These instances use windows authentication to login and all the instances use different accounts.I am trying to come up with a script which can run on all the instances either with Powershell/Vbs/Batch files, that can connect to each of theses instances and execute a SQL script but don't know how to switch windows account for each sql execution. Any help or at least pointing me in the right direction would help.Please note that my ID is like DomainA\User1 but other servers have sysadmin accounts like DomainB\UserX, DomainC\UserY.Thanks for your help
↧