update Install-AteraAgent.ps1 to direct link to MSI
added AteraAgentSetup.msi to /resources
This commit is contained in:
@@ -11,24 +11,26 @@ Function SourceTools
|
|||||||
. SourceTools
|
. SourceTools
|
||||||
|
|
||||||
## Build the path for $AGENT_INSTALLER
|
## Build the path for $AGENT_INSTALLER
|
||||||
$AGENT_INSTALLER = '{0}{1}' -f (GetTempPath), $AGENT_FILENAME
|
#$AGENT_INSTALLER = '{0}{1}' -f (GetTempPath), $AGENT_FILENAME
|
||||||
|
|
||||||
## Make sure we need to install the agent
|
## Make sure we need to install the agent
|
||||||
If ( Test-Path "${Env:ProgramFiles}\ATERA Networks\AteraAgent\AteraAgent.exe" ) { $INSTALL = $false } Else { $INSTALL = $true }
|
If ( Test-Path "${Env:ProgramFiles}\ATERA Networks\AteraAgent\AteraAgent.exe" ) { $INSTALL = $false } Else { $INSTALL = $true }
|
||||||
If ( $FORCE ) { $INSTALL = $true }
|
If ( $FORCE ) { $INSTALL = $true }
|
||||||
If ( $INSTALL ) {
|
If ( $INSTALL ) {
|
||||||
## Download agent and get path
|
## Download agent and get path
|
||||||
|
$AGENT_INSTALLER = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/AteraAgentSetup.msi'
|
||||||
#$AGENT_INSTALLER = Download-File -URL "http://emberkom.servicedesk.atera.com/GetAgent/Msi/?customerId=${CUSTOMER_ID}&integratorLogin=${INTEGRATOR_ID}" -File $AGENT_INSTALLER
|
#$AGENT_INSTALLER = Download-File -URL "http://emberkom.servicedesk.atera.com/GetAgent/Msi/?customerId=${CUSTOMER_ID}&integratorLogin=${INTEGRATOR_ID}" -File $AGENT_INSTALLER
|
||||||
$AGENT_INSTALLER = Download-File -URL 'https://packagesstore.blob.core.windows.net/installers/Fabric/MSI/1.8.0.4/Setup.msi' -FILE $AGENT_INSTALLER
|
#$AGENT_INSTALLER = Download-File -URL 'https://packagesstore.blob.core.windows.net/installers/Fabric/MSI/1.8.0.4/Setup.msi' -FILE $AGENT_INSTALLER
|
||||||
|
|
||||||
## Install the agent
|
## Install the agent
|
||||||
#Try { Start-Process "msiexec.exe" -ArgumentList "/i ""${AGENT_INSTALLER}"" /qn /norestart" -Wait }
|
#Try { Start-Process "msiexec.exe" -ArgumentList "/i ""${AGENT_INSTALLER}"" /qn /norestart" -Wait }
|
||||||
|
LogMsg "Installing Atera agent from: ${AGENT_INSTALLER}"
|
||||||
Try { Start-Process "msiexec.exe" -ArgumentList "/i ""${AGENT_INSTALLER}"" /qn /norestart INTEGRATORLOGIN=${INTEGRATOR_ID} COMPANYID=${CUSTOMER_ID}" -Wait }
|
Try { Start-Process "msiexec.exe" -ArgumentList "/i ""${AGENT_INSTALLER}"" /qn /norestart INTEGRATORLOGIN=${INTEGRATOR_ID} COMPANYID=${CUSTOMER_ID}" -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
## Remove agent installer
|
## Remove agent installer
|
||||||
Try { Remove-Item $AGENT_INSTALLER -Force }
|
#Try { Remove-Item $AGENT_INSTALLER -Force }
|
||||||
Catch { LogErr $_.Exception.Message }
|
#Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
} Else { LogMsg "Atera agent is already installed on this endpoint." }
|
} Else { LogMsg "Atera agent is already installed on this endpoint." }
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user