# Active Backup for Business Client 批量部署脚本(Windows)# 1. 修改以下参数为实际值$ABB_Server_IP = "192.168.1.100" # ABB服务器(NAS)的局域网IP$Client_Installer_Path = "C:ABB_ClientActive Backup for Business Client (Windows).msi" # 客户端安装包本地路径$Log_Path = "C:ABB_Deployment_Log.txt" # 部署日志路径# 2. 检查安装包是否存在if (-not (Test-Path $Client_Installer_Path)) {Write-Output "$(Get-Date) 错误:安装包不存在于路径 $Client_Installer_Path" | Out-File $Log_Path -Appendexit 1}# 3. 静默安装客户端(/qn表示无界面安装)Write-Output "$(Get-Date) 开始安装ABB客户端..." | Out-File $Log_Path -Appendmsiexec /i $Client_Installer_Path /qn /norestart | Out-File $Log_Path -AppendStart-Sleep -Seconds 60 # 等待安装完成(约1分钟)# 4. 配置客户端自动注册到服务器$Reg_Path = "HKLM:SOFTWARESynologyActive Backup for Business Client"if (-not (Test-Path $Reg_Path)) {New-Item -Path $Reg_Path -Force | Out-Null}# 设置服务器IPSet-ItemProperty -Path $Reg_Path -Name "ServerAddress" -Value $ABB_Server_IP -Type String# 设置自动注册Set-ItemProperty -Path $Reg_Path -Name "AutoRegistration" -Value 1 -Type DWord# 5. 启动客户端服务Start-Service -Name "Synology Active Backup for Business Client" -ErrorAction SilentlyContinueWrite-Output "$(Get-Date) 部署完成!" | Out-File $Log_Path -Appendexit 0
Set-ExecutionPolicy Bypass -Scope Process -Force # 临时允许执行脚本(避免权限拦截)C:ABB_Client_Deployment.ps1 # 运行部署脚本
# 远程批量执行ABB客户端部署脚本$Client_IP_List = @("192.168.1.101", "192.168.1.102", "192.168.1.103") # 所有客户端IP列表$Admin_Account = "DOMAINAdmin" # 客户端本地管理员账户(非域环境用本地账户,如".Admin")$Admin_Password = ConvertTo-SecureString "Password123!" -AsPlainText -Force$Credential = New-Object System.Management.Automation.PSCredential ($Admin_Account, $Admin_Password)foreach ($IP in $Client_IP_List) {Write-Output "开始部署 $IP..."Invoke-Command -ComputerName $IP -Credential $Credential -ScriptBlock {# 此处粘贴上述本地执行脚本内容(从参数定义到部署完成)}}
地址:北京市海淀区白家疃尚品园 1号楼225
北京群晖时代科技有限公司