## Path to the MSI installer $MSIURL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/LiquidFiles_Admin_2.0.129.msi' ## Set installer args If ( $LFHost ) { LogMsg "LiquidFiles target server: ${LFHost}" $INSTALLER_ARGS = "REGKEYSCRIPT=""BaseUrl=${LFHost};""" } Else { $INSTALLER_ARGS = '' } ## Run the installer $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 { LogMsg "Deleting downloaded installation package" Remove-Item $INSTALLER -Force -ErrorAction SilentlyContinue } Catch { LogErr $_.Exception.Message }