I have a handful of plug-ins and system settings that I would like to maintain in the K1000. But I would like them to run only once at first check-in. After that we use theses scripts for troubleshooting.
1 Comment   [ + ] Show Comment

Comments

  • chucksteel, i would like to not have to repackage the scripts and settings. As then I have to maintain double the scripts. Any other thoughts on how to just set a label or something that is tied to the first check-in date & time? Then after it is done, have a scripts that rechecks and removes that label?
Please log in to comment

Answers

0
The best way to handle something like that would be to package your scripts and settings like an application and deploy them via a managed install. Include some sort of marker in your script that you can find with a custom inventory rule, either a file or registry key. Then you can deploy that managed install to all devices. 
Answered 08/02/2016 by: chucksteel
Red Belt

  • chucksteel, i would like to not have to repackage the scripts and settings. As then I have to maintain double the scripts. Any other thoughts on how to just set a label or something that is tied to the first check-in date & time? Then after it is done, have a scripts that rechecks and removes that label?
    • You could do that, yes. The issue that you will run into is that it won't run right away on the first inventory. Depending on the scheduling of the script it might be a little longer.

      Scripts do have the ability to install a software title, so you could maintain the scripts as managed installs and then run them on demand using the scripting engine, still.
      • I am fine with the delay. Are only have around 500 PCs that are managed. So we have the agent sync cycle set to 15min. I can wait for 15-30min for the scripts to kick off the first time after a build.

        But how do I auto assign a label to a new inventory record and then remove it after the last script running?
      • The easiest way would be to use a marker file. Create a software title with a custom inventory rule that checks to see if c:\path\marker.txt exists (place the file someplace logical for your organization). Create a smart label that gets assigned to machines that don't have the software title installed. Have your scripts run on computers that have the smart label. As the last part of the script create the file.
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share