major update to backup agent installation
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
## Set the edition of the agent: "server" "desktop" or "vm"
|
||||
$Edition = '{[Edition]}'
|
||||
|
||||
## Specify URL to "Backup for Windows" agent installer
|
||||
$ECB_WIN_URL = 'https://s3.amazonaws.com/cb_setups/MBS/53CFB286-7A97-4FDF-8CFA-475C0DB63A9A/EmberkomEmberkomBackup_v7.2.0.280_netv4.0_ALLEDITIONS_Setup_20210914204936.exe'
|
||||
|
||||
## Specify URL to "Backup Virtual Machine Edition" agent installer
|
||||
$ECB_VMM_URL = 'https://s3.amazonaws.com/cb_setups/MBS/53CFB286-7A97-4FDF-8CFA-475C0DB63A9A/EmberkomEmberkomBackup_v7.2.0.280_netv4.0_VM_Setup_20210914205143.exe'
|
||||
|
||||
## Set the correct download URL and agent edition
|
||||
switch ( $Edition.ToLower() ) {
|
||||
'server' { $URL = $ECB_WIN_URL; $AgentEdition = 'baremetal' }
|
||||
'desktop' { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' }
|
||||
'vm' { $URL = $ECB_VMM_URL; $AgentEdition = 'vmedition' }
|
||||
default { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' }
|
||||
}
|
||||
|
||||
## Install and import the MSP360 Powershell module
|
||||
Run-Script -LivePSScript Install-MSP360PowershellModule
|
||||
Import-Module -Name MSP360
|
||||
|
||||
## Install the agent
|
||||
LogMsg "Installing Emberkom Cloud Backup agent"
|
||||
Try { Install-MBSAgent -URL $URL -Force }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
|
||||
## Set the agent edition
|
||||
LogMsg "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
|
||||
Try { Set-MBSAgentSetting -Edition $AgentEdition }
|
||||
Catch { $_.Exception.Message }
|
||||
Reference in New Issue
Block a user