title: PowerShell Copy-Item gives error in Octopus
body: <p>I try to copy a DLL file from my computer to another and register it:</p>
  
  <pre><code>net use \\RemoteIp\C$\Dev 'pass'/USER:'user'  
  </code></pre>
  
  <p><code>copy-item "D:\test.dll" -Destination "\\RemoteIp\c$\Dev";</code></p>
  
  <pre><code>regsvr32 "\\RemoteIp\C$\Dev\test.dll"
  </code></pre>
  
  <p>The problem that I have is that when I try to run this script from Octopus I receive this error :</p>
  
  <blockquote>
    <p>Copy-Item : Cannot find path 'D:\test.dll' because it does 
    not exist.
    At C:\Octopus\Work\20160606100457-74\Script.ps1:3 char:10
    + copy-item &lt;&lt;&lt;&lt;  "D:\test.dll" -Destination "\RemoteIp\c$\Dev";
        + CategoryInfo          : ObjectNotFound: (D:\test.dll 
       :String) [Copy-Item], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyI 
       temCommand
    The remote script failed with exit code 1</p>
  </blockquote>
  
  <p>If I try to run these lines of code in PowerShell it works properly.</p>
  
  <p>Any suggestions ?</p>
  
  <p>Thank you</p>