title: Copy file remotely with PowerShell
body: <p>I am writing a <em>PowerShell</em> script that I want to run from Server A.
  I want to connect to Server B and copy a file to Server A as a backup.</p>
  
  <p>If that can't be done then I would like to connect to Server B from Server A and copy a file to another directory in Server B.</p>
  
  <p>I see the <a href="https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Management/Copy-Item" rel="noreferrer"><code>Copy-Item</code></a> command, but I don't see how to give it a computer name.</p>
  
  <p>I would have thought I could do something like</p>
  
  <pre><code>Copy-Item -ComputerName ServerB -Path C:\Programs\temp\test.txt -Destination (not sure how it would know to use ServerB or ServerA)
  </code></pre>
  
  <p>How can I do this?</p>