Policy with multiple [same] script can't have unique parameters?

CCNapier
Contributor

Hi

JSS 9.81, using for Mac OSX only.

I have a generic script that accepts parameters, so it can be reused.
I have a policy that calls this script, and passes the parameters accordingly. This works fine...

The problem is when I want to call the script 3 times, with different parameters, from the same policy.

> Create New Policy
> Add Script > Select Script "myscript" > add a string to a parameter
> Add Script > Select Script "myscript" > add a [different] string to a parameter
> Save

It does not save all the parameters. Instead, the topmost script in the list has it's parameters copied to all other scripts in the list.

Is this expected?

1 ACCEPTED SOLUTION

Look
Valued Contributor III

It's been like this for a year or two at least, I have tried it in the past with the same behaviour. Ended up just having multiple policies on the same trigger with the same script.

View solution in original post

4 REPLIES 4

davidacland
Honored Contributor II
Honored Contributor II

Hi,

I just tried it on our JSS and got the same behaviour. It feels more like a bug but would need JAMF to confirm.

I tested cloning the script and adding the second copy to the policy which worked ok, in case you need a temporary workaround.

CCNapier
Contributor

I need to add quite a few, so I'm just making a new script to deal with it for now. TBH, I was in two minds about having a big script to deal with everything, or a big policy with multiple script calls.

I'll flag this issue with JAMF support as it would still have uses.

Look
Valued Contributor III

It's been like this for a year or two at least, I have tried it in the past with the same behaviour. Ended up just having multiple policies on the same trigger with the same script.

CCNapier
Contributor

Thanks, confirmed issue with JAMF. Happy to workaround just now, but they are now aware.