Answers for "powershell copy files from remote computer"

1

powershell copy file to remote computer

Copy-Item -Path \\serverb\c$\programs\temp\test.txt -Destination \\servera\c$\programs\temp\test.txt;
Posted by: Guest on February-25-2021
0

powershell copy folder to remote computer

Start-Transcript -path 'c:\scriptlog.txt'
$ServerList         = import-csv 'C:\powershell\Workstation-test.CSV'
$SourceFileLocation = 'C:\Niche'
$Destination        = 'C$\Niche'
 
foreach ($_ in $ServerList.computer){
    remove-item "\\$_\$Destination" -Recurse -Force -Verbose
    Copy-Item $SourceFileLocation -Destination "\\$_\$Destination" -Recurse -Verbose
}
Stop-Transcript
Posted by: Guest on August-19-2021

Code answers related to "powershell copy files from remote computer"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language