Preferred method of working with scripts?
I am a big user of Managed Installs. I set it all up, give it a label to target, and if the software doesn't exist, it puts it there. It takes care of staggering, doesn't care if the machine is off, and is just "smart" about things. It kind of "manages" itself. It makes sense to me.
One thing I've always struggled with is how to most effectively use a script. So lets say I have a registry key script. Works great if I use the Run Now command. But what's a more "self-managed" way to get it to install on most all of my machines? I've thought about creating a smart label and have it fall in or out of that label. So cool, I do that, but the script setup page wants me to run things on a schedule. So do I set it to run every hour to make sure the script applies? Will it then run every hour until the device checks in an it removes the smart label? Or, if I apply it to a manual label, will it just keep running it on the machine every hour into infinity?
Those are all questions, but some more rhetorical than others. I guess the TLDR question is.... How do you manage your scripts to make sure they are running "smart"?
Hope this makes sense! Thanks!
Scripts are usually something which should run regulary, so this schedule makes sense in the first place.
If you have a one time script a good idea is as follows:
1. run it as an Offline Script. Since Offline scripts don't need agent connection for the whole runtime they have a few more options.
2. set it to run once at next device checkin. This means, next time an inventory is created the script also runs the script.
3. use smart labels to let the device fall out of the label when it has been run.
I don't suggest to let it run on a high schedule because this produces a huge amount of tasks which are not nessesary regulary.
If you have a better idea how it should work you may write it together under kace.uservoice.com to share it with the development team.
You can distribute registry settings via a managed install by creating a custom inventory rule. The "installer" for the managed install is then a script which applies the desired keys.