
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2017 06:30 PM
Hi all,
Is it possible to create a custom item in the asset inventory that would be filled with a command output?
We use LS to deploy a Certificate Authority through a deploy package that issues the command CertUtil.exe to add an specific certificate on the Windows computers.
Now we need to know if there is any computer that lacks this certificate (it can be a failed deploy but also a new computer in the network).
Another use case is to monitor the existence of rogue certificates or certificates from banned authorities.
How do you recommend we should deal with it?
Thanks!
d00b
Is it possible to create a custom item in the asset inventory that would be filled with a command output?
We use LS to deploy a Certificate Authority through a deploy package that issues the command CertUtil.exe to add an specific certificate on the Windows computers.
Now we need to know if there is any computer that lacks this certificate (it can be a failed deploy but also a new computer in the network).
Another use case is to monitor the existence of rogue certificates or certificates from banned authorities.
How do you recommend we should deal with it?
Thanks!
d00b
Labels:
- Labels:
-
General Discussion
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 05:37 PM
You can write the output of a command to for instance a .txt file on the local computer, by for instance running:
command >folderpath\filename.txt
command >folderpath\filename.txt

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2017 06:26 PM
Oh, now I see... I thought it would be something in the custom field that would relate to a command output on that asset.
BTW, even though is not possible to feed a field, is it possible to retrieve the command output somehow?
I was thinking about saving those outputs on a central log facility, as simple as an append line on a shared file, but I don't know. It seems unreliable letting so many computers write at the same time on a log like this.
A return message on a deployment log would be nice, but I don't think it's possible either.
Regards,
d00b

BTW, even though is not possible to feed a field, is it possible to retrieve the command output somehow?
I was thinking about saving those outputs on a central log facility, as simple as an append line on a shared file, but I don't know. It seems unreliable letting so many computers write at the same time on a log like this.
A return message on a deployment log would be nice, but I don't think it's possible either.
Regards,
d00b
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2017 05:57 PM
I believe we were on the same page, though since there's no direct functionality in Lansweeper that would accomplish what you're looking for I was explaining a theoretical workaround, which would require quite a lot of scripting, my apologies for not being fully clear on that.
The unique identifier I was hinting at was what you would use to insert the output of the command into your Lansweeper database, for the correct asset. In other words, pairing the output of the command with the asset it came from, in Lansweeper. That could prove to be quite complex though.
If you want to go halfway, you could gather all the command outputs and manually enter them into Asset Custom fields, which were designed to store any kind of data. Asset Custom fields can be configured under Configuration\Asset Pages.
What I was describing was the creation of a script that would grab the output and identifying information regarding the computer it was retrieved from, which could then be used to create an update query to insert the information into an asset custom field automatically.
The unique identifier I was hinting at was what you would use to insert the output of the command into your Lansweeper database, for the correct asset. In other words, pairing the output of the command with the asset it came from, in Lansweeper. That could prove to be quite complex though.
If you want to go halfway, you could gather all the command outputs and manually enter them into Asset Custom fields, which were designed to store any kind of data. Asset Custom fields can be configured under Configuration\Asset Pages.
What I was describing was the creation of a script that would grab the output and identifying information regarding the computer it was retrieved from, which could then be used to create an update query to insert the information into an asset custom field automatically.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2017 10:11 AM
As alternative, is it possible to auto fill a custom field for a specific asset as result of a deploy action?
Example: I would like to configure a scheduled deployment with a custom program/script that return a single value (for example a .exe or a .bat or .cmd and so on), this value should be inserted in the custom field of the asset on which is it deployed/run.
Is it possible? Can you explain how?
Thanks!
Example: I would like to configure a scheduled deployment with a custom program/script that return a single value (for example a .exe or a .bat or .cmd and so on), this value should be inserted in the custom field of the asset on which is it deployed/run.
Is it possible? Can you explain how?
Thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2017 04:57 PM
You could use Asset Custom fields for this. Asset Custom fields can be configured under Configuration\Asset Pages and are only visible on Asset Summary pages when filled in. To automate the entire process you'd need to do the following:
Unfortunately we cannot provide support in setting this up, though. Some tools and advice:
- Grab the output of the command and a unique identifier for the asset (Lansweeper uses a combination of domain name and computer name)
- Run an updatequery on your Lansweeper database using this output and unique identifier, targeting one of the asset custom fields in tblAssetCustom
Unfortunately we cannot provide support in setting this up, though. Some tools and advice:
- Create a back up your Lansweeper database or use a test environment.
- Use our Database Dictionary, which you can access by going to Reports\Create New Report and then clicking the View Database Documentation button.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2017 05:29 PM
Hello Bruce!
I'm sorry but I didn't quite understand it.
What do you mean by this? The output of the command will differ on every asset, so we can't get a general data to insert in the database manually. The goal here is to add into the asset profile a custom output that will be a result of a query on the system.
Let me give you another example:
An industry wants to know the model of the robotic arm is connected to each one of their automation computers. This is easily discovered by executing the command "RobotInfo.exe -t model", which outputs something like "ArmTech Model C v.1.2" or "ArmTech Model B v.2.0".
Of course, those robotic arms wear out too fast and are constantly being upgraded, so we can't build a static list just to make it appears in the asset registers.
The questions: is it possible to have a field named "Robot Model" filled with the corresponding data so we can generate reports on the assets for this particular field?
Thanks!
Regards,
d00b
I'm sorry but I didn't quite understand it.
Bruce.B wrote:
Grab the output of the command and a unique identifier for the asset (...)
What do you mean by this? The output of the command will differ on every asset, so we can't get a general data to insert in the database manually. The goal here is to add into the asset profile a custom output that will be a result of a query on the system.
Let me give you another example:
An industry wants to know the model of the robotic arm is connected to each one of their automation computers. This is easily discovered by executing the command "RobotInfo.exe -t model", which outputs something like "ArmTech Model C v.1.2" or "ArmTech Model B v.2.0".
Of course, those robotic arms wear out too fast and are constantly being upgraded, so we can't build a static list just to make it appears in the asset registers.
The questions: is it possible to have a field named "Robot Model" filled with the corresponding data so we can generate reports on the assets for this particular field?
Thanks!
Regards,
d00b
