use Install-MBSAgent cmdlet instead of manual install
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user