Automate Computer Groups Creation and Manual Relay Selection

Hi BigFixers,

We have the following use case and would like to confirm whether it can be achieved using BigFix.

We have an Excel (.xlsx) file containing all VLANs and subnets across our environment. Is there a way for BigFix to import the contents of this file and automatically create a computer group for each subnet?

Once these computer groups have been created, is it possible to automatically execute an action for each group to configure its endpoints to manually select a specific Relay?

Our goal is to automate the assignment of clients to their local Relay based on their subnet and avoid manual configuration for a large number of branches.

Regards,

BigFix cannot directly read an Excel file natively, but you can easily bridge this gap using a script (such as Python or PowerShell) using Bigfix Rest API
relevance example for automatic group can be used such as “exists true whose (string value of select "SubnetAddress from Win32_NetworkAdapterConfiguration where IPEnabled=True" of wmi = "192.168.1.0")”

Now this can be parsed as payload.

Another way is to use affiliation policies which is bigfix native way

Instead of creating hundreds of manual computer groups (which can clutter your console and slow down performance), the best approach is to use a script combined with the BigFix REST API to target the endpoints directly.

Here is the conceptual workflow:

  1. Read the File: Save your Excel sheet as a CSV file. Use a PowerShell script (like Import-Csv) to read the subnet and matching relay data line by line.
  2. Loop & Filter: The script will loop through each row. For each subnet, it will generate a BigFix Relevance expression to target only the devices in that specific IP range/CIDR.
  3. Execute the Action via API: The script will then call the BigFix REST API (POST /api/actions) to deploy a dynamic action.
  4. Set the Relay: The action script will contain the command to manually assign the relay: setting "__RelayServer1"="http://your-local-relay:52311/bfmirror/downloads/" on "{now}" to client

This way, the script runs once, reads your sheet, and automatically pushes out the correct relay configurations to all branches based on their subnets.

1 Like

Hi,

Thanks for your reply.
I have more than 60 branches and each branch includes more than one subnet, and that's why I've asked if there is an automation way for that instead of creating many computer groups manualy.

Regards,

Hi,

This is a perfect and amazing approach. But practically how to achieve it. Is there a full guidance to follow and help me to execute that approach?

Regards,

Let me work and create a sample using csv file since we do not use this method and can be pretty exciting to develop it. Allow me sometime. Meanwhile if @shabircse has any pre written solution

1 Like

I know there's not much detail in this document, but the Location Property Wizard can make it fairly easy to create a single property that will map to and return different results based on a device's subnet (or IP range, or even other attributes). This could be valuable not just for Relay selection, but for general filtering, reporting, and other configurations and policies.

You can also extend the concept to have a single policy action in BigFix to manually assign the Client's Relays based on the desired mapping.

That said, there's also Automatic Relay selection and an ability to refine the automated selection using Relay Affiliation that may be helpful here as well.

2 Likes

I came to recommend using the Location Property wizard as well. You could then setup a task that would setup relay affiliation assignments based on the property values in the Location by IP range or Location by Subnet property.

I would say though that if your main goal is to set relay affiliation by location then I would say a task to do so would likely be better than a ton of computer groups, because I believe the computer group is going to have quite a bit of overhead with re-evaluations.


2 Likes