Required Files: None
This will download your custom whitelabel installer, install, set the product type, and log the user in.
Just add your recent windows installer.exe as C:\temp\backup-installer.exe in the required files section to make it work.
Import-Module $env:SyncroModule # Get these 2 values from this page; https://mbs.cloudberrylab.com/Admin/Settings.aspx $whitelabelCompanyName = "Your Co" $whitelabelProductName = "Your Product" $cloudberryOnlineUser = "[email protected]" $cloudberryOnlinePassword = "theirPassword" $backupPlanName = "Workstation Backups" $backupSchedule = "-every day -at 00:00" # Add your installer .exe to your Script Files so you can deploy and install via this script. # Attach your installer as C:\temp\backup-installer.exe #https://help.cloudberrylab.com/cloudberry-backup/getting-started/installation-and-configuration/installing-cloudberry-backup#silent-installation-via-command-line-interface if ([System.IntPtr]::Size -eq 4) { $winBit = "" } else { $winBit = " (x86)" } $pathToCbb = "C:\Program Files$winBit\$whitelabelCompanyName\$whitelabelProductName\cbb.exe" # Send silent installer command to start & C:\temp\backup-installer.exe /S 2>&1 Start-Sleep -Milliseconds 300 while(Get-Process backup-installer -ErrorAction SilentlyContinue) { write-host "Waiting for install to finish..." Start-Sleep -Milliseconds 3000 } #cbb.exe option -edition desktop #cbb.exe addAccount -e [email protected] -p their_password & cmd /c $pathToCbb option -edition desktop 2>&1 & cmd /c $pathToCbb addAccount -e $cloudberryOnlineUser -p $cloudberryOnlinePassword 2>&1 Write-Host "Ok, its installed! We also set to Desktop and logged in. Now we just gotta setup the plans!" $tmpFile = "C:\temp\cbb_accounts.txt" & cmd /c $pathToCbb account -l > $tmpFile 2>&1 gc $tmpFile $accounts = gc $tmpFile [regex]$regex = '\w+-\w+-\w+-\w+-\w+' $accountID = $regex.Matches(($accounts | select-string -pattern "Space used")).Value # we are going to get the first storage account and use it. # sample output from 'account -l' command # Sure Data Backup - Online Desktop/Server (File Backup) Edition Command Line Interface started # Login: [email protected] # Storage accounts: # 1. ID: '1111111-fe57-43bb-be93-ABC123'. Name: 'Cloud Account' Space used: 84268664 #cbb.exe addBackupPlan -n "CLI" -aid 1111111-fe57-43bb-be93-ABC123 -d %userprofile%\Documents -notification ErrorOnly -winLog on -every day -at 00:00 cd "C:\Program Files$winBit\$whitelabelCompanyName\$whitelabelProductName\" & cmd /c cbb.exe addBackupPlan -n $backupPlanName -aid "$accountID" -d "C:\Users" -notification ErrorOnly -winLog on -every day -at 00:00 2>&1 Write-Host "Nice! Now you have a backup plan!" |