diff --git a/Install-EmberkomCloudBackup.ps1 b/Install-EmberkomCloudBackup.ps1 index 128ca59..5e617f4 100644 --- a/Install-EmberkomCloudBackup.ps1 +++ b/Install-EmberkomCloudBackup.ps1 @@ -15,18 +15,16 @@ switch ( $Edition.ToLower() ) { default { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' } } +# Install and import additional Powershell module +Install-MSP360Module +Import-Module -Name MSP360 + +# Download the installer +$Installer = Download-File -URL $URL + # Install the agent LogMsg "Installing Emberkom Cloud Backup agent" -Try { - $JobName = "MSP360AgentInstall" - Start-Job -Name $JobName -Scriptblock { - Install-MSP360Module - Import-Module -Name MSP360 - Install-MBSAgent -URL $URL -Force - } - Wait-Job -Name $JobName - Remove-Job -Name $JobName -Force -} +Try { Start-Process "${Installer}" -ArgumentList "/S" -Wait } Catch { LogErr $_.Exception.Message } # Add backup user to installed product