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: 139  
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 Using tblO365User report for devices Out of warranty
by  QueryLSTech   Go to last post Go to first unread
Last post: Yesterday at 5:15:37 PM(UTC)
Lansweeper Duplicate assets, random monitor unique keys
by  kloosterd  
Go to last post Go to first unread
Last post: Yesterday at 1:00:34 PM(UTC)
Lansweeper Scanning - nothing appears in the queue
by  LS IT Admins   Go to last post Go to first unread
Last post: Yesterday at 11:08:22 AM(UTC)
Lansweeper Broken scanning of AD
by  LS IT Admins  
Go to last post Go to first unread
Last post: Yesterday at 10:59:35 AM(UTC)
Lansweeper New ticket auto-assignment & default state
by  Brandon   Go to last post Go to first unread
Last post: 5/13/2021 5:21:31 PM(UTC)
Lansweeper Automatic Follow-Up for Tickets
by  Francis Lee Mondia - Endace  
Go to last post Go to first unread
Last post: 5/12/2021 11:06:51 PM(UTC)
Lansweeper Can't see devices on Lansweeper
by  vqT4cDoP9iXyMZwoDUWU   Go to last post Go to first unread
Last post: 5/12/2021 8:33:21 PM(UTC)
Lansweeper LAPS managed password
by  SystemAdmin  
Go to last post Go to first unread
Last post: 5/12/2021 6:08:42 PM(UTC)