Asked By
ualmselwo
20 points
N/A
Posted on - 06/29/2016
Can anyone help me with Power Shell copy file to remote computer? What is the shortest way to copy a file to the remote computer with Power Shell?
Answered By
s.fogel
20 points
N/A
#169494
Commands To Make PowerShell Copy File To Remote Computer Simple
You can use admin contributions to copy files to remote computer. Here is one of the easy ways to do it:
Copy-Item -Path \server1C:programstempfile.txt -Destination \server2C:programstempfile.txt;
If the above command does not work for you, try another alternative command code for copying:
Dir c:files*.xml | copy-file to remote –destination c:XML –computer $My Servers
This command will copy all the XML files from mentioned source to the destination.