title: WCF service trying to run a Powershell script to Remote in on a different machine
body: <p>I'm trying to run the following scrip on my WCF service hosted on my computer.</p>
  <pre><code>string exePath = &quot;C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe&quot;;
              var ps1 = new ProcessStartInfo();
              ps1.FileName = exePath;
              ps1.Arguments = &quot;-ExecutionPolicy Bypass -File C:\\Users\\fn070084\\Desktop\\Test2.ps1&quot;;
              ps1.WorkingDirectory = Path.GetDirectoryName(exePath);
              Process.Start(ps1);
              
  </code></pre>
  <p>If I run just this code, it runs correctly on Visual studio, but when I put it on a service on the WCF server it's not doing something.</p>
  <p>The code for the Test2 File is this one</p>
  <pre><code>$LogFile = &quot;\\ComputerName\C$\powershellLog&quot; + $LongTime + &quot;.txt&quot; &quot;Hello, I'm running Powershell through C#&quot; &gt;&gt;$logFile
  </code></pre>
  <p>Note: I wrote it as &quot;ComputerName&quot; but on my actual code I'm having the the rigth computer name.</p>