Scripting besadmin commands

I can’t seem to find the proper syntax to run a besadmin command silently, say as a part of a script. How do I pass credentials via command line?

Are you meaning on Windows or Linux?

Windows, sorry should have specified.

BESAdmin on Windows is a graphical app primarily. There are the same options I believe on Windows as there are on Linux

The only way I know is to interact with them in the GUI so unless someone else can step in?

What are you trying to script with BESAdmin? Most of the things it can do should only run infrequently.

If you’re referring to the newer functionality where the Audit Trail Cleaner or the Computer Remover utility are integrated with BESAdmin, those can be scheduled within BESAdmin itself…

Yes I’m looking specifically at computer remover utility. How do I run that on say a daily basis?

I’m looking to utilize the /removecomputersfile switch and specify a file. I was able to do it previously with the remove utility.

1 Like

Does the remove utility no longer work? I thought the remove utility still functioned, but that you could also set it up in BES Admin to run on a schedule if you wanted.

Here is some documentation on BES Admin tool options: http://www.ibm.com/support/knowledgecenter/SSQL82_9.5.0/com.ibm.bigfix.doc/Platform/Installation/c_list_of_advanced_options.html#c_list_of_advanced_options

You can use the REST API to delete a list of computers. This is how I typically do it.

Is this your RFE you filed on this? http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=94726

If so, I have some ideas on how to automate the cleanup using the REST API and Session Relevance. How many computers do you typically delete at a time?


Related:

I’m actually not sure if we provided an updated tool for the 9.5 releases. The BESAdmin tool took over the work. The DB version must be one that the tool can handle so if it is not updated the old tools will not work.

Yeah that is my RFE, and no they didn’t create another tool since it’s in BESAdmin. I know roughly how I can do it via Powershell with the API and Session relevance (I’ve done something similar), but my point is this was functionality that used to exist but was removed.

Thoughts on using posh+api =

  1. The report I do in Web Reports, just convert to custom session relevance and pass via API, find the computer name + computer ID
  2. For each computer ID, pass along a delete command to the API for each system

I assume via the REST API delete, do I need to go one system at a time? Not that big of a deal, but not sure if I can be more efficient.