Search function in Console

(imported topic written by SystemAdmin)

Hello,

If I have a list of workstation names I want to “find” - what is the best method to get back a search selection of those handful of PCs? Using the “find” function it only appears that I can search for one PC at a time. Instead of scrolling through the entire list of PCs in the console is there a good method for searching on a list of PC’s - when all I have are the names? Thank you.

Mike

(imported comment written by SystemAdmin)

Hi Mike,

There are a couple of ways to generate Ad-Hoc groups using your list (http://forum.bigfix.com/viewtopic.php?id=39).

Non of these are directly searching for your list. It would be possible to build a wizard or dashboard that took your list and then linked to a computer group (ad-hoc group).

Anyone want to throw together a quick dashboard that takes a list of computers and links it to an ad-hoc group?

(imported comment written by jessewk)

Try this out and let us know how it goes:

  1. In the console, type ctrl-alt-shift-D.

  2. In the debug window that comes up, check the box ‘Show Debug Menu’ option.

  3. From the debug menu, select ‘Presentation Debugger’.

  4. Make sure the ‘presentation’ radio button is selected and paste the code below into the top box.

  5. Change the line ‘TheRelevance = …’ to the relevance clause you’d like to use to filter out computers

  6. Click evaluate, then click the link that appears.

    Number of matching computers:

(imported comment written by SystemAdmin)

Ok, that does the job. I forget how though - I can add multiple “names” to the search though. Also, how would a non-admin user of the console excute this (or a someone with limited knowledge of the console)? Maybe I should request this in the new features group (“multiple find feature”. Here was the scenerio I was attempting to do.

  • I had 10 workstations out of 3300 agents that I wanted to push the anti-spyware install to.
  • The workstation names are all over the board (we use the serial number of the hardware as PC name).
  • I could scroll down the entire list of 3300 agents and control click on each one and then add to the ad-hoc group - but extremely time consuming and tedious.
  • none of the workstations had anything relevant - so there was nothing I could do to sort them by initially. They were 10 workstations scattered around our campus with nothing in common.

As well, there is no way to save this debug code to use later, correct? Thanks for everyone’s help.

Mike

(imported comment written by jessewk)

Mike,

If you import the attached .bes file, it will create a new Task that you can use to do your searching. In the Task description there will be a text box to type your relevance expression. When you click evaluate, it will tell you how many computers match your search and provide a link to an ad-hoc group from the results. This way you won’t need to go through any of the debug menu stuff, and it will always be available to you when you need to do a complicated search.

Also note that, while we have many ways to filter computers and to search for them, we are working on ways to improve the experience in instances like your example.

Finally, here’s some relevance examples to get you started:

ids of bes computers whose (name of it starts with “A”)

ids of bes computers whose (name of it as lowercase ends with “xyz”)

ids of bes computers whose (name of it starts with “A” OR name of it as lowercase ends with “xyz”)

ids of bes computers whose ((name of it starts with “A” AND name of it as lowercase ends with “xyz”) OR name of it contains “123”)

(imported comment written by SystemAdmin)

That works slick! Thank you. Last question. I’m drawing a blank on the syntex. If I want to add a search pattern for multiple agents with norelevence to a standard naming convention what is the correct syntex? So where I replace “foo” with the name, how would I search for:

workstationone, tompc, bigboy, testserver, etc

Thanks.

(imported comment written by jessewk)

Mike,

There are lots of ways you can do your search. The basic technique would be to OR together a bunch of clauses where each clause identifies a subset of your machines. You might have one clause that finds machines that start with “tompc” and another clause that only matches on the exact name ‘testserver’. Here’s relevance that would do that:

ids of bes computers whose (name of it starts with “tompc” OR name of it = “testserver”)

Another technique would be to use a regular expression that matches on various patterns. You could write a single regex that catches all your machines, or several of them together as above. Here’s a regex version of the above query that has the same behavior.

ids of bes computers whose (exists match (regex “(^tompc|^testserver$)”) of name of it)

If you want to ignore case, you can cast the name as lowercase, or use the ‘case insensitive regex’ inspector.