📌  相关文章
📜  powershell 将文件夹复制到远程计算机 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:37.895000             🧑  作者: Mango

代码示例1
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