定时拷贝脚本
假设C:\123为机台源文件夹,目标路径为C:\
$copyTime=Get-Date -Format 'yyyy-MM-dd'
$copyDir="machine-"+$currentTime
Copy-Item C:\123 -Recurse C:\ $copyDir
定时删除脚本
删除两天前
$deleteTime=(Get-Date).AddDays(-2) | get-date -format "yyyy-MM-dd"
$deleteDir="C:\machine-"+$deleteTime