Associated Files called in Custom Inventory Rule
Is it possible to create a Software Inventory item that has a script loaded in Associated Files and call that script from the Custom Inventory Rule?
I have a script that will return the list of critical Windows updates. Right now I'm calling that from a file share via a Custom Inventory Rule. I would like to do away with the file share as the only thing it's doing is serving up a few scripts I call this way.
So can I add the file to the Associated Files as: critical_updates.vbs
Then in Custom Inventory Rule call it: ShellCommandTextReturn(cscript //nologo critical_updates.vbs)
Answers (2)
Hello,
I do not think this is possible but you can use an alternative approach.
You can define a K1000 Script ( http://k1000/adminui/kbot_list.php ), execute it periodically and then use a Sofware Inventory item to return the content of a file.
To clarify:
- the script will execute the action required and generate an output file with the output you require in a specified location
- The Custom Inventory rule will grab through the inventory the content of the output file,
The advantage is that if you define a script the payload of the script can be stored in the K1000 instead of a network share.
Kind regards,
StockTrader
Running that VBS at each inventory can cause a lot of overhead for you. Also, a custom inventory rule wouldnt trigger the download of an associated file from the K1000. I would run the VBS using a KScript on a schedule (possibly once or twice a day). Have that export its results to a text file. Then return the results of that in your custom inventory rule. That will result in less overhead for the K1000.
Also, a custom inventory rule wouldnt trigger the download of an associated file from the K1000.