Skip to main content

Hello,


I want to start with how much I have enjoyed working with the patching portion of Automox, works amazingly well. I am no expert in Powershell so please forgive my ignorance if any of the feedback is not valid. Here are the difficulties and or suggestions I have found for Worklets.





  1. There are two windows to place code, can we have the option of just having one? I can’t understand the purpose of there being two.


  2. We need the ability to deploy the Worklets manually so that you can test the outcome or if you added a new PC and want to deploy software to it.


  3. If you could see the code execute line by line troubleshooting would be greatly enhanced. Currently I have to build a PS script outside of Automox in order to troubleshoot and then adopt it to fit the criteria of the Worklet interface.


  4. There should be a log feature that we could turn on for verification of the worklets behavior.


  5. Unless I am mistaken you can only work with one file per worklet. This greatly limits the ability to install anything other than an MSI.


  6. If I evaluate a state of something, I then have to re-evaluate that same condition to see what I need to remediate in the lower window. Example ( I check to see if Notepad++ is installed, if not then it needs to install, if it is but an older version I need to uninstall the old one first and then install the new one)


  7. Do variable values pass from the top window to the lower one?




What would make this 100% easier to work would be that if the script works on your PC it will work in Worklets. The only change required would be to change the path for the file.



Thank you in advance.

Good questions, and I know some of the answers!







  1. The evaluation code isn’t strictly necessary. If you want the remediation code to run every time, just put in a placeholder evaluation code to return 1 as the value, which tells the remediation code to execute (e.g. Exit 1)







  2. You can do that on the System Mgmt page. First, make the sure policy is assigned to a group. Then click on the policy you want to run and click the Execute Policy Now button. Note that this disregards the evaluation code and just runs the remediation code immediately.







  3. Agreed, that would be a nice feature to have. I’d like to see us build more of an IDE for the worklets so you can both write, test and run worklets more easily. That way you wouldn’t have to switch back and forth with another window.







  4. The Activity log will show what the remediation code returns, so you can return messages depending on the outcome of the code. I agree on the fuller logging. That would fit in nicely with #3, to have a debug mode where running worklets would output line by line as to what’s happening. In the meantime the best thing to do is build and debug your code in your powershell IDE of choice and then once you have it working do the final test run through Automox.







  5. You can upload more than one file per worklet. We don’t make it super obvious, but if you click the Upload File button a second time, you can upload a second file and you’ll see them both listed. I have heard reports that there might be a bug with accessing that second file, so if your code doesn’t have the ability to access it please let me know so that we can confirm that bug. Another tip: if your code is in Powershell syntax, it will recognize the file by name alone in the current working directory, but if your code is in command shell syntax you’ll need to put .\ in front of the file name for the command shell to recognize and access the file through your code.







  6. Yes that is true - there’s no state kept between the evaluation code and the remediation code running. The only dependency between the two is the return value from the evaluation code to determine whether the remediation code runs or not. You could potentially store something on the local machine to preserve info from the evaluation to the remediation, but that is something you’d have to hack together yourself by storing a info in a local file and then reading from that file in the remediation code.







  7. Same answer as 6 - that’s a potential future feature, to preserve variables, and other state info, from the evaluation code to the remediation code.







Hope that helps and please let me know if you have follow-up questions!


Thank you for all the additional information and clarity. Really nice to work with a group open to new ideas.


My pleasure, and thanks for giving your feedback as that helps point us in the right direction!


OneDrive for Business Worklet Ideas:





  • Set default “Backup” folders to sync: C:\Users%user%\Desktop | Pictures | Downloads | etc.


  • Set AutoSave On/Off and location


  • Set AutoRecover On/Off and location


  • Set other general settings:







Reply