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 uVNC Portable (trying to replace LSRemote)
by  Cripple.Zero   Go to last post Go to first unread
Last post: 5/11/2021 3:35:45 PM(UTC)
Action Remote Uninstaller
by  Tyler M.  
Go to last post Go to first unread
Last post: 5/7/2021 8:22:38 PM(UTC)
Lansweeper Verify a successful copy to user computer
by  Brandon   Go to last post Go to first unread
Last post: 4/22/2021 9:09:50 PM(UTC)
Lansweeper Pablo
by  Pablo  
Go to last post Go to first unread
Last post: 4/20/2021 8:05:07 PM(UTC)
Lansweeper Can Actions work when using when using a Ubuntu machine
by  mzipperer   Go to last post Go to first unread
Last post: 4/1/2021 10:16:34 PM(UTC)
Lansweeper Remove user from local admin group
by  jhartley@alcona-county.net  
Go to last post Go to first unread
Last post: 3/24/2021 4:27:30 PM(UTC)
Action Password Status
by  mcgr5   Go to last post Go to first unread
Last post: 3/24/2021 2:07:51 PM(UTC)
Lansweeper Network Scanning
by  MZU  
Go to last post Go to first unread
Last post: 3/7/2021 8:23:10 AM(UTC)