Posted on 09-05-2013 12:39 PM
Sorry if there has already been something posted on this. I did a couple of searches and didn't find anything.
Ultimately, I'm looking to scope some EA's. Found this and voted it up.
https://jamfnation.jamfsoftware.com/featureRequest.html?id=1030
I also voted up the feature request to bring back the recon verbs
https://jamfnation.jamfsoftware.com/featureRequest.html?id=78
In the mean time, if I create an EA with the Data Type as a String and the Input Type as Text Input, is there a way to populate that field with a separate script? Then you could scope the policy as need, essentially scoping an EA in a round about way.
I haven't touched the API yet but was thinking with the API this could be possible. Any thoughts?
Posted on 09-06-2013 04:56 AM
Why would you want to scope an extension attribute instead of scoping a policy that contains a script?
Posted on 09-06-2013 08:17 AM
We use EAs to collect information and scripts to perform actions. Some of the information we want to collect is not global so it's not necessary to run that EA on all computers which is why it would be nice to be able to scope EAs.
Posted on 09-07-2013 07:39 AM
Why not simply populate the EA using a script directly ?
Rather then using this "double method" ?
After all if you are going to source from a script to begin with, I see no point in introducing an intermediate stage..
- Just directly populate the EA from a script.
Yes you do have to run this on all computers, but the script could start with some condition that creates a shortcut exit on those machines that it's not to apply to.
Currently there is no way to scope EA's, and no 'contrived' way that I can think of.
The best method I can come up with for now is the "short-cut exit"
If necessary, if the conditions are really complex, then you could simplify by creating another script to set a client-side flag, and then test for that as the short-cut exit condition for the EA.
That would make the EA a very light-weight process, that could easily be run on all clients, with minimal impact.
So I think that would be the way to go.
Posted on 09-09-2013 07:40 AM
@PeterClarke
I think what you are saying makes the most sense for now. I already have the script perform some conditional checks before it proceeds. I just wanted to throw the idea out there to see if it was possible. Thanks for the feedback.
Posted on 09-22-2021 08:59 PM
I have started using this. It allows for populating EAs.
You will need to package the logging file and deploy it before the script runs. But its works great!