Notification

Icon
Error

LsAgent for Windows command line options?

Posted: Wednesday, February 5, 2020 10:43:07 PM(UTC)
RobertB

RobertB

Member Original PosterPosts: 30
1
Like
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,
Erik.T
#1Erik.T Member Administration Posts: 99  
posted: 2/13/2020 8:43:21 AM(UTC)
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.
LANGuy
#2LANGuy Member Posts: 2  
posted: 6/25/2020 7:05:36 PM(UTC)
Well that doesn't sound like something I can push out or easily automate.
RobertB
#3RobertB Member Original PosterPosts: 30  
posted: 6/25/2020 7:08:35 PM(UTC)
Originally Posted by: LANGuy Go to Quoted Post
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.
cycleheat
#4cycleheat Member Posts: 35  
posted: 6/29/2020 8:58:59 PM(UTC)
It's not very clean, but if you reinstall the agent then it will scan again.
Orion Poplawski
#5Orion Poplawski Member Posts: 5  
posted: 4/17/2021 4:47:53 PM(UTC)
Originally Posted by: RobertB Go to Quoted Post
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:
Code:

---
- 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
Brandon
#6Brandon Member Posts: 135  
posted: 4/19/2021 4:49:17 PM(UTC)
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.

Active Discussions

Lansweeper Report showing only Wi-Fi Devices and MAC addresses
by  Andy.S   Go to last post Go to first unread
Last post: Today at 2:23:24 PM(UTC)
Lansweeper Modifying Purchase Date / Yearly Refresh Report
by  Cripple.Zero   Go to last post Go to first unread
Last post: 5/7/2021 7:06:47 PM(UTC)
Lansweeper Tweak LanSweepers Bios Version Audit to show Last Seen
by  Tyler M.  
Go to last post Go to first unread
Last post: 5/6/2021 8:22:40 PM(UTC)
Lansweeper Patch Volume Across Fleet
by  darren.kimber  
Go to last post Go to first unread
Last post: 5/5/2021 11:29:33 PM(UTC)
Lansweeper Show Date Without Time
by  nhouse24   Go to last post Go to first unread
Last post: 5/4/2021 10:39:43 PM(UTC)
Lansweeper Report of list of assets
by  Carlos Montes  
Go to last post Go to first unread
Last post: 5/4/2021 2:52:15 PM(UTC)