I need to setup a simple extension attribute to display the installed version of Python on our MacBooks. I'm using the following script input, but the display in machine inventory for the extension attribute remains blank. What am I missing? Here is the script:
#!/bin/sh PY=`python --version` echo "<result>$PY</result>" exit 0
That should do it, right?
Any help is appreciated!
Solved! Go to Solution.
Nice, can also pull the major.minor.patch (semver.org), and use a Smart Computer Group to flag any computers that have a python3 version that isn't at the desired version or higher.
For example if you want everyone on 3.9.7 or higher, flag any computers that do not match this regex. This way if someone has a newer version, they don't get rolled back (unless you're enforcing a specific version):