我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

Powershell:powershell脚本同步备份文件到其他服务器

Remove-PSDrive Z

创新互联建站于2013年创立,先为应城等服务建站,应城等地企业,进行企业商务咨询服务。为应城企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

$User = "192.168.1.1\administrator"
$PassWord = ConvertTo-SecureString -String "Passw@rd" -AsPlainText -Force
$Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $PassWord
New-PSDrive -Name Z -PSProvider FileSystem -Root \192.168.1.1\Backup -Persist -Credential $Credential
$timelabe = Get-Date -UFormat "%Y-%m-%d-%H-%M"
Get-date -uformat "%c" >> d:\log\$timelabe.log
echo "Starting synchronize files..." >> d:\log\$timelabe.log
robocopy D:\Backup Z:\ /mir >> d:\log\$timelabe.log
Get-date >> d:\log\$timelabe.log


网站名称:Powershell:powershell脚本同步备份文件到其他服务器
网页URL:http://shouzuofang.com/article/gjeigg.html

其他资讯