System information
85
Parallels Mac Management Features
You can type (or copy and paste) the script into the Script edit box. If you have the script saved in
a file, click the Open button to browse for it.
A remediation script is used to remediate noncompliant setting values found on a Mac. The
noncompliant value is passed to the script as an input parameter after obtaining it with the
discovery script and assessing it using the compliance rules. A remediation script should return 0
(zero) as a string via standard output.
When the remediation script returns, the discovery script is executed again to obtain the updated
value. The value is then evaluated using the compliance rules. If the value complies, the
assessment finishes with success. If the value is still noncompliant, a noncompliance is reported to
SCCM.
Please note that a remediation script will run in OS X with root privileges. Please also note that you
cannot access OS X GUI components from a remediation script. For example, you cannot open a
dialog to be displayed to the Mac user.
Specifying Script Interpreter
When creating a discovery or a remediation script, use the syntax described below to specify the
interpreter that should be used to run it.
The first line of the script should begin with shebang and have the following format:
#! interpreter [interpreter-args] <args-list-terminator> [#comment]
where:
• interpreter is the absolute path to the interpreter executable (e.g. /bin/bash).
• interpreter-args is the list of the interpreter arguments.
• args-list-terminator is the terminating character of the argument list. The terminator is needed
for passing the result of the discovery script to the remediation script.
Python example:
#! /usr/bin/python -
Bash example:
#! /bin/bash --
• comment is a comment that you might want to add to the script.
Creating Compliance Rules
A compliance rule defines compliance conditions for the value returned by the discovery script. The
conditions are defined using the Create Rule dialog, which is opened from the Create Setting
dialog, which in turn is opened from the Create Configuration Item Wizard (p. 82).