Notification

Icon
Error

LsAgent.ini - Move configuration settings to the Windows Registry

Posted: Tuesday, August 27, 2019 4:02:46 PM(UTC)
Joe Conger

Joe Conger

Member Original PosterPosts: 3
0
Like
I would be much easier to remotely manage the LsAgent.ini settings if you put those settings in the HKLM registry.

For example I want to force a scan of all the LSAgent hosts. I have network tools that I can remotely modify the registry and restart services. So I could clear all the LSAgent hosts LastScan & LastSent settings and then restart the LanSweeper Agent Service.



Orion Poplawski
#1Orion Poplawski Member Posts: 5  
posted: 4/17/2021 4:49:12 PM(UTC)
Originally Posted by: Joe Conger Go to Quoted Post
I would be much easier to remotely manage the LsAgent.ini settings if you put those settings in the HKLM registry.

For example I want to force a scan of all the LSAgent hosts. I have network tools that I can remotely modify the registry and restart services. So I could clear all the LSAgent hosts LastScan & LastSent settings and then restart the LanSweeper Agent Service.


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
IT-EPUDF
#2IT-EPUDF Member Posts: 2  
posted: 4/21/2021 10:37:26 AM(UTC)
does the script exist in Powershel for Windows ?
Brandon
#3Brandon Member Posts: 139  
posted: 4/21/2021 4:32:08 PM(UTC)
Why not use LSPUSH? You can do those on demand using a deployment.
IT-EPUDF
#4IT-EPUDF Member Posts: 2  
posted: 4/21/2021 11:26:00 PM(UTC)
Yes indeed it works with LSPUSH
it was the syntax that was not very clear!
so it is: lspush.exe LAN-001 9500
https://www.lansweeper.c...how-to-scan-with-lspush/

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)