Run exe on remote server under different account

249 Views Asked by At

I need to run an exe on a remote server. I'm using Invoke-Command -UseSSL to initiate the exe on the remote server. The exe does some work but when it needs to connect to the SQL Server, it fails to authenticate. Looking in the server log, it looks like exe are connecting to SQL Server using NT/AUTHORITY account. The security team are not allowing CredssP on the network. Is there any means I can run the exe with an explicitly defined account. An account other than the account that is used to created the remote session with.

Invoke-Command -UseSSL -ComputerName $AppServer -ScriptBlock {&"C:\Program Files\my.exe" "Params"}
0

There are 0 best solutions below