Answers for "powershell copy directory to remote computer"

0

powershell copy folder to remote computer

Start-Transcript -path 'c:scriptlog.txt'
$ServerList         = import-csv 'C:powershellWorkstation-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 directory to remote computer"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language