Remote Schema Compare for Oracle fails

I have created a PS script scriptA.ps1 on PC-A in which I am using Schema Compare for Oracle via command line in the following way (there are also several lines of code in which I am redirecting the standard output and errors into certain files but I will not include them in this post to make it shorter)
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = "C:\Program Files\Red Gate\Schema Compare for Oracle 4\sco.exe"
$pinfo.Arguments = "/source `"user/pass@tns1{schema}`" /target `"user/pass@tns2{schema}`"

When I run the script locally from PC-A on which it is created, everything is fine and it works like a charm

But once I try to run it remotely from PC-B with invoke-command like this:
Invoke-Command -ComputerName $DeploymentTargetHostname -ScriptBlock {
$psi = New-Object System.Diagnostics.ProcessStartInfo
$psi.FileName = (Get-Command Powershell).Definition
$psi.Arguments = "-ExecutionPolicy Bypass -File C:\Temp\scriptA.ps1"

It fails with the following errors:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout)
   at RedGate.Ipc.NamedPipes.NamedPipeEndpointClient.Connect(Int32 timeoutMs)
   at RedGate.Ipc.Rpc.RpcConnectionProvider.TryGetConnection(TimeSpan timeout)
   at RedGate.Ipc.ReconnectingConnectionProvider.ReconnectionWorker()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

So far I tried many things, tried disabling firewalls, disabling Network access: Restrict anonymous access to Named Pipes and Shares... but no luck so far.

Any ideas how to solve this?
Sign In or Register to comment.