From f63c3f9a2276aab67f160ef17e40d19dff63aa29 Mon Sep 17 00:00:00 2001 From: dyoder Date: Wed, 11 Aug 2021 16:05:03 -0400 Subject: [PATCH] direct download of latest agent during installation --- Install-AteraAgent.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Install-AteraAgent.ps1 b/Install-AteraAgent.ps1 index c436cc5..340cf83 100644 --- a/Install-AteraAgent.ps1 +++ b/Install-AteraAgent.ps1 @@ -1,10 +1,13 @@ param( [Parameter(Mandatory=$true)][int]$CUSTOMER_ID, [Parameter(Mandatory=$true)][string]$INTEGRATOR_ID, - [Parameter(Mandatory=$false)][string]$AGENT_FILENAME="EmberkomAteraAgentSetup.msi", + [Parameter(Mandatory=$false)][string]$AGENT_FILENAME="AteraAgentSetup.msi", [Parameter(Mandatory=$false)][switch]$FORCE ) +## Set the Atera URL for your specific environment +$BASE_URL = 'https://emberkom.atera.com' + ## Source the Tools.ps1 script Function SourceTools { . $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1'))) } @@ -32,7 +35,7 @@ If ( $INSTALL ) { } ## Download agent installer - Download-File -URL 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/AteraAgentSetup.msi' -File "${AGENT_INSTALLER}" + Download-File -URL "${BASE_URL}/GetAgent/Msi/?customerId=${CUSTOMER_ID}&integratorLogin=${INTEGRATOR_ID}" -File "${AGENT_INSTALLER}" ## Install the agent LogMsg "Installing Atera agent"