Home > Bash scripting, Casper > Setting Parameter Labels in Casper

Setting Parameter Labels in Casper

I recently learned about how to use Parameter Labels as part of a JAMF training class. I had read about them in the Casper Administrator’s Guide but managed to fundamentally misunderstand what they did and how they work.

What I thought:

Adding a Parameter Label value to a script in Casper Admin meant that the associated variable value would be pre-set for the script when I added it to a policy.

I didn’t want this behavior, as I wanted to maintain flexibility when setting policies. Consequently, I didn’t set anything in the Parameter Label value for my scripts.

How they actually work:

Setting the Parameter Label value in Casper Admin means that you’re changing the label that shows up in the script parameters in a policy. For example, changing the Parameter Label value for Parameter 4 in Casper Admin to Username means that the parameter name for the script will change from Parameter 4 to Username when you add the script to a policy.

Screen Shot 2014-03-20 at 10.29.02 AM

Screen Shot 2014-03-20 at 10.28.01 AM

Here’s how to set Parameter Labels in Casper Admin:

1. Open Casper Admin

2. Select the script you want.

3. Click the Info button.

Screen Shot 2014-03-20 at 10.30.47 AM

4. Click the Options tab.

Screen Shot 2014-03-20 at 10.32.11 AM

5. Set the parameter you want to change to the desired name.

Screen Shot 2014-03-20 at 10.26.28 AM

6. When you create a policy that uses that script, the parameter will have the name you set instead of the default parameter name.

Screen Shot 2014-03-20 at 10.28.01 AM

Categories: Bash scripting, Casper
  1. March 20, 2014 at 7:57 pm

    Custom labels equally useful in cases where your parameters need to be set to a specific set of choices (i.e.: true/false, specific format, etc). I use this for a universal DockUtil script to good effect (see: http://s17.postimg.org/4c1pjhtsf/Screen_Shot_2014_03_20_at_3_53_56_PM.png)

  2. Mike Hendrickson
    March 21, 2014 at 1:50 pm

    That was my initial understanding of the parameters as well! I was so happy when I was corrected.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 151 other followers

%d bloggers like this: