
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2018 09:58 PM
I don't know that this is possible so please humor me,
I want to create a report that would find all assets in a particular OU in active directory, if the assets are spotted there the asset state would then need to be changed to a new state
example: Asset A is moved to OU broken, then the asset A state would be changed to broken in lansweeper.
This action (deployment) could be run every week and ensure data consistency between AD and LanSweeper.
Thoughts, suggestions?
Thank you for your time
Edit: I know all about the manual mass-edit way this could be done, I'm lazier than that.
I want to create a report that would find all assets in a particular OU in active directory, if the assets are spotted there the asset state would then need to be changed to a new state
example: Asset A is moved to OU broken, then the asset A state would be changed to broken in lansweeper.
This action (deployment) could be run every week and ensure data consistency between AD and LanSweeper.
Thoughts, suggestions?
Thank you for your time
Edit: I know all about the manual mass-edit way this could be done, I'm lazier than that.
Labels:
- Labels:
-
General Discussion
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2018 03:02 PM
Interesting idea!
First off I would like to point out the built-in database cleanup options. One of the options will set assets to non-active if they have been disabled in AD.
If you are talking about custom states or states based on OU. This is technically possible.
You could create a deployment which runs a database script on your lansweeper database. This script changes the states of all the assets which have a specific OU. This link should help you with the commands for how to run the SQL script: https://docs.microsoft.com/en-us/sql/relational-databases/scripting/sqlcmd-run-transact-sql-script-files?view=sql-server-2017
However, you could do this easier by scheduling a job in SSMS to run the script daily. Kinda like it is mentioned here: https://stackoverflow.com/questions/5471080/how-to-schedule-a-job-for-sql-query-to-run-daily
First off I would like to point out the built-in database cleanup options. One of the options will set assets to non-active if they have been disabled in AD.
If you are talking about custom states or states based on OU. This is technically possible.
You could create a deployment which runs a database script on your lansweeper database. This script changes the states of all the assets which have a specific OU. This link should help you with the commands for how to run the SQL script: https://docs.microsoft.com/en-us/sql/relational-databases/scripting/sqlcmd-run-transact-sql-script-files?view=sql-server-2017
However, you could do this easier by scheduling a job in SSMS to run the script daily. Kinda like it is mentioned here: https://stackoverflow.com/questions/5471080/how-to-schedule-a-job-for-sql-query-to-run-daily
