Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Newbie with Copy question

$
0
0
# 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.


Viewing all articles
Browse latest Browse all 13067

Trending Articles