Commands To Make PowerShell Copy File To Remote Computer Simple

Asked By 20 points N/A Posted on -
qa-featured

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?

SHARE
Answered By 20 points N/A #169494

Commands To Make PowerShell Copy File To Remote Computer Simple

qa-featured

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.

Login/Register to Answer

Related Questions