Powershell:powershell脚本同步备份文件到其他服务器-古蔺大橙子建站
RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
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脚本同步备份文件到其他服务器
分享链接:http://scgulin.cn/article/gjeigg.html