Deploying a task or fixlet based on MAC address

(imported topic written by bchae91)

If given a list of MAC addresses. Is there a way i can someone just cut and paste the list into the console so that a particular task is sent to just the computers with a MAC address in the list? Also, this list changes on a daily basis.

I already collect the MAC addresses via a retrivied property.

Any help would be appreciated. Thanks.

(imported comment written by BenKus)

Hey bchae,

Roughly how many mac addresses are you looking to paste in?

Ben

(imported comment written by bchae91)

Right now its up to 250, but it could become more than that. So it would have to be a scalable solution.

(imported comment written by bchae91)

It doesn’t have to be cut and paste i suppose. It could be a process by which we read data in from a file. But i would not prefer to send out a file to all of the nodes just to send a task to 50 comptuers.

(imported comment written by BenKus)

bchae,

The short answer is that there is no easy way to do this. The BES Console only takes lists of computer names.

But… You could write a script that takes in a list of mac addresses and spits out a list of computer names that you could target by… you could do this with database access or with direct session queries to web reports… Or… you might take advantage of the relevance language here to get this list.

There is a small complication here that the BES Console can run session queries but not client relevance queries (for security reasons)… But try this:

  1. Take the “client.dll” at “C:\Program Files\BigFix Enterprise\BES Client\BESLib\Inspectors” and copy it to the BES Console subfolder at “C:\Program Files\BigFix Enterprise\BES Console\BESLib\Inspectors” (you should have the BES Console and BES Client the same version).

  2. Restart the BES Console and open the “Presentation Debugger” (CTRL-SHIFT-ALT-D, check “show debug menu” box, and open the debug menu)

  3. Put the mac addresses (separated by line break) in a file “C:\mac.txt”

  4. In the presentation debugger, run the relevance:

unique values of items 0 of items 0 of (((name of it, concatenation of values of results (bes property “mac address”, it)) of bes computers whose (exists name of it AND exists value of result (bes property “mac address”, it))), (lines of file “C:\mac.txt”)) whose (item 0 of it as string contains item 1 of it as string)

Substitute the property name (twice) or the file name as appropriate… If you did everything right, the BES Console should spit out a list of names of computer that had mac addresses in the file.

Couple notes:

  • You will need to update the client.dll file each time you upgrade the console.
  • Because you put the client.dll in your BES Console folder, your BES Console operators with authoring privileges could theoretically launch an attack on you by getting you to open custom fixlets with specially crafted javascript.

Let me know if this works for you (it took quite a while to get right, so I hope it does work).

Ben

1 Like

(imported comment written by bchae91)

Sweet. It worked. Thanks Ben. One thing i did have to add was a “as lowercase” to (item 0 of it as string contains item 1 of it as string) because the data that we get has the MAC addresses in capital letters, but the BigFix console has them as all lower case.

(imported comment written by BenKus)

Glad it worked!

If we ever meet, you can buy me a beer because building that whole thing and getting it to work took the better part of my Tuesday night… :slight_smile:

Ben