Policies, Scripts & Order of Command Execution

msample
Contributor II

What's consistent "Best Practice" for utilizing policies with scripts? Scripts that populate various fields work well when a policy has been configured to execute the tasks needed, but the time of execution poses a concern (i.e., after, before, at reboot). To help expedite time and not reinvent the wheel, I'm wondering if anyone has a time tested method that I can put into place without spinning my wheels?

Secondly, the order of execution when Imaging is also a concern and setting this up in Casper Admin or the JSS console (i.e., priority... 1, 2, 3, etc).. Obviously the OS is at the top of the list being #1, but is there a best practice with what flows afterwards? Placement of pkgs, scripts? I do understand that everyone has a different approach regarding what works best for them, but I'm hoping someone has a good layout of a good best practice. I just don't have a huge amount of time to peruse through tons of forums.

Thanks in advance for the thoughts, comments and ideas out there!

4 REPLIES 4

Simmo
Contributor II

Tends to depend what the content of the script is where you want to place it.
Any scripts I have in my imaging workflow are all 'At Reboot' as all of my packages install after reboot as well.

As for the order of execution for packages, it's mostly there for if you have any packages which have dependancies, i.e you can have an installer set to 10 then an update for that install set to 11.

I don't think there is any real "best practice" to this, more just what is suited to your environment with the packages and scripts that you have in place.

msample
Contributor II

Great tip Matt. I'll try this. My order/priority has been configuring: OS @ 1, pkgs @ 5, scripts like AD binding @ 6, so forth and so on. I wasn't sure if this was affecting how quickly things are layered into the OS during Casper Imaging's run. Scripts I felt definitely written in by the Casper Imaging Utility around 5 or 6, and pkgs around 4 or 5.

bentoms
Release Candidate Programs Tester

makander
Contributor

I dont know if this helps you in anyway but I set policies that I want to go in a specific order by doing this:

A. Policy 1
B. Policy 2
C. Policy 3

Casper goes through them in alphanumeric order.