Skip to main content

Can I pre-enroll iMacs, add these per-enrolled iMacs to a static group? if so how ?



I have a policy that I want to run that is 'triggered' by 'enrollment', the 'scope' for this policy will be this static group?



(the policy installs a network printer)

It just popped in my mind to do this;



this is for a computer lab; that uses a standard and smart configuration, I will stick an additional script in the smart configuration



I will create a simple script that runs at reboot calling the policy



jamf policy -id *



has anyone tried or is doing such a thing?


Hi @tcandela,



I've done something similar in imaging workflows, although rather than calling the policy by it's ID, I prefer to assign the policy a custom trigger (you can call this anything you want, like 'printer') and then call it in my script like this.



jam policy -event printer


Hope that helps!


@kitzy i've used custom triggers on other policies, my syntax is



jamf policy -trigger mytriggername


q


@kitzy using a custom trigger or jamf policy -id * does a scope need to be set to specific computers?



if the configuration is telling it to install, then it shouldn't need a scope ? it does what the config is set to do?


@tcandela you'll still need to scope to something. The beauty of a policy that uses only a custom trigger is that you could conceivably scope to everything since the only way the job gets called is by trigger.



However, you could scope to a Smart Group and assign these machines based on some criteria.


@tcandela jamf policy -trigger was the verbiage used in in older JAMF Binaries. While jamf policy -trigger still works I would recommend using jamf policy -event moving forward. If you do a jamf help policy that will show the current options.


@stevewood understood, thanks



@Joel.Peasley Thanks, I'll make the syntax change to -event