Skip to main content

Is there any documentation about adding a Python script to the JSS?



I have a Python script that takes a couple of parameters that id like to run at login. I have tried to add it but it doesn't seem to work.



So if there is something that covers this from end to end it would be greatly appreciated.

When I try to use this script, it is not allowing me to include '/' in the parameter



I want to make sure documents is included but 'HOMEDIR/Documents' is changed to 'HOMEDIR'



any idea why?


I ran this ten seconds ago:



/Users/ms/Documents/GitHub/changeSidebarLists/Change_Sidebar_List.py last HOMEDIR/Documents


It worked as expected. The only thing I can assume is a spelling error?
Does anything else work? Are you sure you set it to "Casper Mode"?
Post your policy, script or terminal output.


HOMEDIR/Documents also works fine for me.



Are your Documents redirected? if so is the redirection finished before the script is run?



I put in a delay to overcome this.


The path is being redirected, and if I run the command manually it seems to work, it appears to be more of JSS issue. When I enter homedir/anything in the parameter box of jss and hit save
at that point it gets removed. (nothing wrong with the script I just don't understand why JSS is not allowing me to save parameters with '/' in them


Figured it out, I needed to run this command multiple times, so I added it into a policy twice, jss was having issues differing between these two entries and forces the same parameters
I removed one, and that seemed to resolve the issue and I can include the '/' in path


I just stumbled on this thread I can really use your assistance in turning this script into something I can use for casper. Most importantly I would like to see and learn what you did....! Thank you.



I need to turn off the banner alerts and have them be alerts by default for the casper management app



https://1drv.ms/u/s!AsQSVIJSCA-VgdBmIAkn_cxYEOwobQ



I attached the script and basically through the arguments I just to need to have this ran.



NCutil.py -a alerts com.jamfsoftware.Management-Action



I can get it to work locally on the machine with no issues. Thank you so much.


@charles.krivan you'll need to deploy the .py to he devices then call via a policy with the arguments.


Reply