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 Creating a count
by  Brianne   Go to last post Go to first unread
Last post: Yesterday at 6:12:49 PM(UTC)
Lansweeper Some reports shows dublicated assets
by  Andy.S  
Go to last post Go to first unread
Last post: Yesterday at 9:46:37 AM(UTC)
Lansweeper Adding "multi-part" Conditions to Reports
by  Brandon   Go to last post Go to first unread
Last post: 5/13/2021 1:52:17 PM(UTC)
Report Center Microsoft Outlook email bug EX255650
by  Esben.D  
Go to last post Go to first unread
Last post: 5/12/2021 2:30:16 PM(UTC)
Lansweeper Patch Tuesday May 2021
by  Esben.D   Go to last post Go to first unread
Last post: 5/11/2021 8:13:06 PM(UTC)
Lansweeper Report showing only Wi-Fi Devices and MAC addresses
by  Andy.S  
Go to last post Go to first unread
Last post: 5/11/2021 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)