Action to dynamically create managed property

Hi guys,
I want to create some endless action that will retrieve registry key from specific path on a servers, and based on registry keys, it will create/delete a property from BigFix managed properties.

to make it easier to understand, think about directories in specific path in server, lets say: C:\Temp
I want property to be created based on list of files there, example:
c:\temp\myname1.txt
c:\temp\myname2.txt
c:\temp\myname3.txt
etc.
I want a property to be created dynamically based on a filename (besides the extension ofcourse :slight_smile: )
is it possible?

regards

You won’t be able to dynamically create a new property, but you could include the filename as part of a value.

For instance if reading the first lines of those files, you might define the property as

(Name of it & ": " & line 1 of it as string) of files whose (name of it starts with "myname" and name of it ends with ".txt") of folders "c:\temp"

This I know…
But I never know the count of files I’ll have.
Once I have 2 files, the other time I’ll have 7 files…
The question is how to have properties dynamically?

Is there an API maybe that creates properties?

Perhaps you could give us a little bit more context on what you are trying to achieve. While it is in fact possible to create properties via the APIs, there may be alternative ways to achieve the overall goal. As Jason suggests, it is often better to have a single property that can dynamically return different values based on local conditions. And it is certainly possible for a single property to handle multiple files.

Are you trying to group machines, or be able to target machines based on these files? More insight and details here would be helpful.

I’m trying to fetch list of cluster resources.
I’ve created a powershell script that that runs each interval and fetching cluster resources from server, I’ve managed currently to write these resources to registry specific path inside REG_SZ with semicolon seperated.
example:
myApp;81.45.68.12
myDB;21.15.16.21

and I’m retrieving this reg with BigFix, but the output is not convinient to work with when exporting to CSV, as they can be changed and increased/decreased/modified.
therefore I want to create property for each cluster resource dynamically so it would be convenient to work when exported to CSV