VBScript to export data to text file

Hello, I’m new to BigFix so any assistance will be greatly appreciated.

I need to be able to extract data to a text file. For example I’d like to extract computer info including computer name and operating system for starters.

I’d like to use VBScript if at all possible.

Any tips or help using existing interfaces would be welcomed as well.

Thanks in advance.

There are quite a number of ways to extract BigFix data. There is a SOAP and REST API available that can be leveraged for such purposes:


(this link contains in the attachments section a utiilty to extract data to CSV via the SOAP API for instance)


(this link has some good example code to leverage the REST api- including C#, Perl, Powershell, Python, and Ruby…unfortunately no vbscript yet)

Depending on your requirements, you might even be able to use Web Reports to output CSVs using scheduled activities:


Where are you trying to generate and place the text file?

Are you trying to have this text file on the client?

What is this for, if you can say with a bit more specifics?

I’m hoping to develop a vbscript coding solution that will allow me to extract data periodically from BigFix as a structured text file.

That file will be periodically consumed by Splunk. We will then use Splunk to analyze the data over time.

The generation, placement and location of the text file will be on a nearby Windows Server (could be a client or not).

I’d like to be able to do this from vbscript so that I can arrange and format the text file the way I need it for Splunk consumption.

Best regards

I’m still not completely certain.

Is every client going to run the VBScript individually and create the text file locally on the client? Then is it going to be consumed by splunk from the endpoint? If so, then a task is what I would recommend, not so much the REST API.

If however you are going to run code against the root server and pull back data on many clients at once, then you would be using some sort of API like REST, SOAP, or the DB one.

Command line interface is pretty simple too.
It’ll give you an XML file back. I think you can install this anywhere and it might be easier for you than the REST API

I simply want to extract data from BigFix using VBScript. In my endless searches I have found a statement here and there indicating that you can use VBScript but little to no explanation or sample code snippets. I’m beginning to think that vbscript is not a commonly used language with BigFix.

Have a look here The operator "bes action" is not defined

Call this interface with your VBScript ?

I still am confused by what you mean. I can help, but I need more specifics. Do you want to dump out info on the client itself and consume it from there, or do you want to get data out of the BigFix Root server? These are 2 very different approaches.

Your referring to VBScript makes me think you are wanting to do this on the client side, not the server side, though that is not necessarily the case.

Can you provide an example file in the format you are looking to create? It can have fake data in it, I just need to know what you are trying to get.

You can use any language including VBScript that you can run from the command line in a BigFix task’s actionscript. You can use any language that supports REST or SOAP or SQL to get info out of the Root Server. You could probably use VBScript to get info out of the Root Server, but it is not the language I would recommend, but I still don’t know what you are trying to accomplish.

Thanks for your patience, as I mentioned I’m starting from ground zero. Hopefully I’m assuming correcting that the BigFix data resides on the server. I’d like to run a vbscript that queries that server and writes out specific fields of every record to a text file.
IE Timestamp=“Fri, 27 Feb 2015 13:48:26 -0500”| client_id=“xx” | client_name=“xxx” | user_name=“xxx” | os=“Mac” | …
Ideally my script would write fieldname= followed by the returned value of each field; with field/values separated with a pipe character.

This should be possible using VBScript and the REST API, though personally I would find it easier to use something like CURL, or the command line tool. If I was going to use a programming language to do it, then I’d use Python or Powershell.

You should start with the Session Relevance Tester and see if you can get what you want with that, then use the same query with the REST API.

How many total endpoints do you have?

Do you install Splunk on all of your endpoints already? If so, I would ingest the data on the endpoints instead of querying the root server. It would be trivial to put down this info on each endpoint using relevance substitution and the create file command.

And you can also use the command line interface, which is a command line wrapper for the REST API, may be simpler than making REST API calls - either way REST or the Command LIne Interface seem to be the way to go.

Both will give you data back in XML which you’ll need to parse to get your desired format.

Depending exactly what data you need to get back you may be able to do the formatting within the query itself and in this case you’ll just need to extract the formatted result from within the XML.

My blog post gives a simple way to start exploring how the REST API works. It has a simple query that returns the computer ID and the last time the computer reported back to the server.
The blog post also has links to more REST API examples.