From 38e38d29b44c790ea9c0deb56e1f9dc830234788 Mon Sep 17 00:00:00 2001 From: dyoder Date: Fri, 24 Sep 2021 09:43:08 -0400 Subject: [PATCH] use MSP360 module to perform agent installation added -Verbose option to Set-MBSAgentSetting for troubleshooting --- Install-EmberkomCloudBackup.ps1 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Install-EmberkomCloudBackup.ps1 b/Install-EmberkomCloudBackup.ps1 index 1f3a3ef..f94b9b4 100644 --- a/Install-EmberkomCloudBackup.ps1 +++ b/Install-EmberkomCloudBackup.ps1 @@ -22,21 +22,13 @@ Install-PSAteraModule Import-Module -Name PSAtera ## Install the agent -#$INSTALLER = Download-File -URL $URL LogMsg "Installing Emberkom Cloud Backup agent" Try { Install-MBSAgent -URL $URL -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""" -Try { Set-MBSAgentSetting -Edition $AgentEdition } +Try { Set-MBSAgentSetting -Edition $AgentEdition -Verbose } Catch { $_.Exception.Message } ## Get agent details and custom fields from Atera