cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ErikT
Lansweeper Tech Support
Lansweeper Tech Support
Certain actions can render your LsAgent clients in a disabled state.

They mainly can get disabled in two ways:

  1. By manually disabling them under Scanning > LsAgent Scanning in the web console. This manual option provides flexibility for users in managing their agents.
  2. By deleting an asset in your web console with LsAgent installed. This will send an update to the agent to disable itself.

When disabled, a LsAgent client will no longer perform scans until they are enabled again.


Enabling your agents can be done by manually ticking the checkbox in front of the disabled agent and hitting the "Enable" button in the Scanning\LsAgent Scanning tab of the Lansweeper web console. This is the recommended way of re-enabling your LsAgent clients.

However, if you have a bunch of disabled agents, this can soon become a cumbersome task. To re-enable your LsAgent clients in bulk, you can tick the checkbox in the top left corner of the LsAgents lists in the Scanning\LsAgent Scanning tab and click the enable button, or you can use one of the scripts below.

Before running any scripts on the Lansweeper database, create a backup of your installation to be safe,
back up your installation first.

Open SQL Server Management Studio and connect to the instance hosting your Lansweeper database.
Execute the script that fits your needs in a new query window.

  • Script 1 will enable all manually disabled agents. (see option 1 above)
    --This script will enable all manually disabled agents
    USE lansweeperdb
    UPDATE tblLsAgentAsset
    SET Status = 1
    WHERE Status = 0 AND AssetID IS NOT NULL

  • Script 2 will enable all agents that were disabled because their asset page was deleted. (see option 2 above)
    --This script will enable all agents that were automatically disabled due to their asset page being deleted in Lansweeper
    UPDATE tblLsAgentAsset
    SET Status = 1
    WHERE Status = 0 AND AssetID IS NULL

  • Script 3 will enable all agents. (see options 1 and 2 above)
    --This script will enable all disabled agents
    USE lansweeperdb
    UPDATE tblLsAgentAsset
    SET Status = 1
    WHERE Status = 0


Note:
The status of LsAgents clients is checked every 24 hours. So any state change might not reflect immediately.


Was this post helpful? Leave a Kudo!
Did you have a similar issue and a different solution? Share your work in the comments below and help your fellow IT Hero's!
More questions? Browse our  Quick Tech Solutions  or  Community Forum.


If you can't find what you're looking for, create a post in our Community Forum.



New to Lansweeper?

Try Lansweeper For Free

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

Try Now