Author Posts

July 16, 2014 at 7:37 am

I want to copy a file from one computer to another on the same domain. I am an admin on both boxes and on the domain and am logged into PowerShell 3 as an admin as well. I am VERY new to this and can't figure this one out. I would like to do this by sending the file to the other machine name, in this case ED0000400005409 and make it reside on that machines desktop. I keep trying and failing. Thanks in advance for any help.

July 16, 2014 at 8:21 am

# Copy example
# Use this command to see how to use Copy-Item commandlet
help Copy-Item -Full
$Source = "d:\files\MyFile.txt" # or "\\server1\share1\folder1\file1.txt"
$Target = "\\PC1\d$\folder\"
Copy-Item -Path $Source -Destination $Target -Confirm:$false -Force

To make the target a machine's desktop, you need to identify whose desktop. Each user logged on each machine gets their own desktop. The path to the desktop will depend on the OS version, domain membership, as well as the user name.
All can be scripted if you can provide clarity on these questions.

July 16, 2014 at 8:23 am

Copy-Item -Path "C:\MyFile.txt" -Destination  "\\ED0000400005409\c$\Users\GSinger\Desktop


July 16, 2014 at 8:35 am

Fantastic, I used the command as Rob Simmers posted it and it worked perfectly. Thank you so much.I got tired of tryong to figure that one out and finally had to just break down and ask