→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎08-27-2019 05:02 PM
‎04-21-2021 05:32 PM
‎04-22-2021 12:26 AM
‎04-17-2021 05:49 PM
Joe Conger wrote:
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.
---
- 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
‎07-13-2021 04:46 PM
Orion Poplawski wrote:Joe Conger wrote:
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:
---
- 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
‎04-21-2021 11:37 AM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now