Wildcard variable in smart group criteria?

fsjjeff
Contributor II

Hey all

I have another question, and since the response was so helpful on my earlier question will try again - hopefully you will all be patient with me, as I'm working on getting our Casper system going - have about 3500 computers and 22 servers to get going this summer, so I'm sure I'll be turning to this list quite a bit over the next couple of weeks...

Anyway, I'm seeing a small handful of my computers that aren't getting named correctly, so something in my bind / naming script probably didn't work. I'd like to create a smart group with those machines, and hoping to pull out anything that doesn't follow our naming convention.

Is it possible to have wildcards in the smart group criteria? Our computer names are usually something like LocationCode-ModelUserType-AssetID, so for example eap-82e-00728.

I tried entering *--, but it just pulled out everything in our inventory, so that's not quite right.

I just searched through the Casper Suite Reference Manual, but not finding much, other than the steps to create a smartgroup, with a step to "Enter the criteria for this item in the corresponding field"

Anyone know if wildcards are possible?

Thanks again,

Jeff

8 REPLIES 8

jstrauss
Contributor

Don't know if anyone responded yet (I seem to be having mail issues where stuff is getting deleted so I don't know if responses got trashed), but if not:

The wildcard is %.

- Jeff

ernstcs
Contributor III

And as for the binding stuff, you currently can't use spaces, they get
replaced with -, and if you try to use an ' it will just not name the
machine at all (Dev ID: D-000692) and use what the name of the OS was if you
use OS DMGs.

Also, thanks for the % note, did not know that...then again, never had a
reason for wildcards so far. =)

Craig E

spowell01
Contributor

Im gonna bring this one back from the dead.

I have smart groups created for specific school locations, based on the computer name...if it starts with CO, then it would be in the central office smart group and have specific things available to it. The % wildcard does not seem to work as I am getting machines with CO anywhere in their name as members of the smart group.

frozenarse
Contributor II

I believe that a '%' can represent one or many characters where a '_' will take the place of a single character.

justin
New Contributor

hi, using JSS 8.71, I'm not able to get this working.. basically, i want to have a smartgroup that just checks to see if there are any cached packages in the waiting room, and if so installs them. I'd like a wildcard "has <cached package> *" and just install whatever is in the cache. Ideas? is there a better way?

mm2270
Legendary Contributor III

@justin, you could try using criteria like-

Cached Packages | has | %.pkg
or
Cached Packages | has | %.dmg

Haven't really tried that so I don't know if it will work, but worth trying.

Another way to handle this would be to build an Extension Attribute which just provides a count of the number of items in the Waiting Room directory, or more specifically the number of pkg or dmg files in it, since its always possible a random xml file got left behind, which could throw things off. If you build said EA as an integer, you can then create a Smart Group based something like:

Number of cached packages | greater than | 0

We actually have an EA just like this.

cdenesha
Valued Contributor III

Look
Valued Contributor III

I basically solved this issue by having an Extension Attribute run a script on the machine to determine if it's named correctly and then populate with either TRUE is it's right or the name of the device if it's wrong.
I then have a smart group of all the devices that are not TRUE or blank and that's my list of misnamed machines Throw away any old inventory ie: 30 days + for more useful info and to stop you chasing ghosts.