Files
management-scripts/Install-LiquidFilesOutlookAgent.ps1
T

24 lines
827 B
PowerShell
Raw Normal View History

2020-09-07 17:09:46 -04:00
param([string]$URL)
## Path to the MSI installer
2021-05-06 11:57:17 -04:00
$MSIURL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/LiquidFiles_Admin_2.0.114.msi'
2020-07-31 12:44:03 -04:00
## Set installer args
2021-05-06 11:57:17 -04:00
If ( $URL ) {
2020-10-22 14:01:35 -04:00
LogMsg "LiquidFiles target server: ${URL}"
2020-08-09 17:52:30 -04:00
$INSTALLER_ARGS = "REGKEYSCRIPT=`"BaseUrl=${URL};`""
2020-07-31 12:44:03 -04:00
}
Else { $INSTALLER_ARGS = '' }
## Run the installer
2021-05-06 11:57:17 -04:00
$INSTALLER = Download-File -URL $MSIURL
LogMsg "Installing Liquid Files Outlook Agent from ""${INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart ${INSTALLER_ARGS}" -Wait -ErrorAction Stop }
Catch { LogErr $_.Exception.Message }
## Delete installer
Try {
2021-05-24 14:05:59 -04:00
LogMsg "Deleting downloaded installation package"
Remove-Item $INSTALLER -Force -ErrorAction SilentlyContinue
2021-05-06 11:57:17 -04:00
}
Catch { LogErr $_.Exception.Message }