diff --git a/Install-EmberkomCloudBackup.ps1 b/Install-EmberkomCloudBackup.ps1 index c85c6ca..1f3a3ef 100644 --- a/Install-EmberkomCloudBackup.ps1 +++ b/Install-EmberkomCloudBackup.ps1 @@ -22,15 +22,17 @@ Install-PSAteraModule Import-Module -Name PSAtera ## Install the agent -$INSTALLER = Download-File -URL $URL +#$INSTALLER = Download-File -URL $URL LogMsg "Installing Emberkom Cloud Backup agent" -Try { Start-Process $INSTALLER -ArgumentList "/S" -Wait } +Try { Install-MBSAgent -URL $URL -Force } Catch { LogErr $_.Exception.Message } -If ( Test-Path $INSTALLER ) { - LogMsg "Deleting Emberkom Cloud Backup agent installer: ""${INSTALLER}""" - Try { Remove-Item $INSTALLER -Force } - Catch { LogErr $_.Exception.Message } -} +#Try { Start-Process $INSTALLER -ArgumentList "/S" -Wait } +#Catch { LogErr $_.Exception.Message } +#If ( Test-Path $INSTALLER ) { +# LogMsg "Deleting Emberkom Cloud Backup agent installer: ""${INSTALLER}""" +# Try { Remove-Item $INSTALLER -Force } +# Catch { LogErr $_.Exception.Message } +#} ## Set the agent edition LogMsg "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""