cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RobertBasil
Engaged Sweeper III
Are there any command line switches for the LsAgent that is currently installed on a Windows computer?

For example.

LsAgent.exe /scan to force it to scan?

If yes, where might I find a list of these switches?

Thank you,
6 REPLIES 6
brandon_jones
Champion Sweeper III
You can also use LSpush to do on demand scanning. You just have to create a deployment.

Here is the code that you can import to create the deployment. I have the lpush file in a folder named tools in the package share. Adjust it to fit your needs.
opoplawski
Engaged Sweeper III
RobertB wrote:
Are there any command line switches for the LsAgent that is currently installed on a Windows computer?

For example.

LsAgent.exe /scan to force it to scan?

If yes, where might I find a list of these switches?

Thank you,


This is the ansible play (lansweeper-rescan.yml) we use to force a rescan:

---
- hosts: windows
gather_facts: no
tasks:
- name: "Stop LansweeperAgent"
win_service:
name: LansweeperAgentService
state: stopped
- name: "Remove timestamps from LsAgent.ini"
win_lineinfile:
path: C:\Program Files (x86)\LansweeperAgent\LsAgent.ini
regex: ^Last
state: absent
- name: "Start LansweeperAgent"
win_service:
name: LansweeperAgentService
state: started
cycleheat
Engaged Sweeper III
It's not very clean, but if you reinstall the agent then it will scan again.
LANGuy
Engaged Sweeper II
Well that doesn't sound like something I can push out or easily automate.
RobertBasil
Engaged Sweeper III
LANGuy wrote:
Well that doesn't sound like something I can push out or easily automate.


Exactly. Not sure why something basic like a switch to start a scan is not available.
ErikT
Lansweeper Tech Support
Lansweeper Tech Support
Hi RobertB,

LsAgent has no switches to force start a scan. However, you can force start it by:
  • Stopping the Lansweeper Agent Service under services.msc.
  • Open LsAgent.ini in the LansweeperAgent installation folder.
  • Remove the values for LastScan and LastSent in this file and save the file.
  • Restart the Lansweeper Agent Service.