use MSP360 module to perform agent installation

added -Verbose option to Set-MBSAgentSetting for troubleshooting
This commit is contained in:
2021-09-24 09:43:08 -04:00
parent 88de4abcb1
commit 38e38d29b4
+1 -9
View File
@@ -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