cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jconger
Engaged Sweeper
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.



5 REPLIES 5
brandon_jones
Champion Sweeper III
Why not use LSPUSH? You can do those on demand using a deployment.
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.com/knowledgebase/how-to-scan-with-lspush/
opoplawski
Engaged Sweeper III
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
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


How do you run this? What is a yml file?

Thanks
IT-EPUDF
Engaged Sweeper II
does the script exist in Powershel for Windows ?

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now