cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DonnyBuckman
Engaged Sweeper

We use a Powershell script to install the LsAgent across the enterprise. This works great. It downloads the newest version of the agent and runs it fine. Now we are trying to use the same process to upgrade LsAgent to the newest version 11.1.10.0. Here is the line in our Powershell script that does the work.

 

Invoke-WebRequest -Uri "https://content.lansweeper.com/LsAgent-windows/" -OutFile $DownloadDestFile; Start-Process -FilePath $DownloadDestFile -ArgumentList "--mode unattended --server obscureserver.com --agentkey obscureagentkey" -Wait
 
Does anyone know if the argument list is different for upgrades? I do not seen any errors in our event logs when the script runs, it just fails to upgrade.
 
Thank you,
 
Donny Buckman
2 REPLIES 2
KPEBA
Visitor Sweeper

function Download-LansweeperAgent {

$url = "https://content.lansweeper.com/lsagent-windows/"

$downloadPath = "$env:TEMP\LansweeperAgentInstaller.exe"

Invoke-WebRequest -Uri $url -OutFile $downloadPath
}


function Install-LansweeperAgent {

$installerPath = "$env:TEMP\LansweeperAgentInstaller.exe"


Start-Process -FilePath $installerPath -ArgumentList "--mode unattended --unattendedmodeui minimalWithDialogs" -Wait

}

Download-LansweeperAgent
Install-LansweeperAgent

Tim_N
Lansweeper Employee
Lansweeper Employee

Hello @DonnyBuckman 

Your LsAgent installs *should* update when you update your Lansweeper installation. If there's a new LsAgent version included with the Lansweeper update, it will be detected, downloaded, installed, and restarted. This updated version will come directly from the scanning server that was recently updated or through the agent relay server. 

So, technically, you shouldn't have to run an update command on your LsAgent installs. But if you have found a bug in this performance, please open a ticket with Support so we can get this resolved. 

Best wishes. 
Tim

 

Tim N.
Lansweeper Employee

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now