📅  最后修改于: 2022-03-11 14:49:37.895000             🧑  作者: Mango
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