Skip to main content
Question

Adding a Python Script to JSS

  • March 26, 2015
  • 32 replies
  • 84 views

Show first post

32 replies

Forum|alt.badge.img+4
  • Contributor
  • June 10, 2015

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?


Forum|alt.badge.img+10
  • Contributor
  • June 10, 2015

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.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • June 10, 2015

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.


Forum|alt.badge.img+4
  • Contributor
  • June 10, 2015

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


Forum|alt.badge.img+4
  • Contributor
  • June 10, 2015

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


Forum|alt.badge.img

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.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • August 20, 2016

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