Copy file remotely with PowerShell
问题 I am writing a PowerShell 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. 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. I see the Copy-Item command, but I don't see how to give it a computer name. I would have thought I could do something like Copy-Item -ComputerName ServerB -Path C:\Programs\temp\test.txt -Destination (not sure how it would know to