POS-44 Add scripts to read license activation type from PD#15
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Jamf extension attribute script that reads the Parallels Desktop license activation type (e.g., LIC_KEY, SSO, MASTER_KEY_TEMP, LIC_KEY_TEMP, NOT_ACTIVATED) by querying prlsrvctl info --license --json and extracting the activation_type field via plutil. Wraps the result in a <result> tag for Jamf consumption, with fallbacks when the value is missing or Parallels Desktop is not installed.
Changes:
- New script
jamf/extensions/get-license-activation-type.xmlreporting the license activation type. - Refreshes the license before reading via
prlsrvctl update-license. - Handles missing activation type and missing Parallels Desktop installation with explicit
<result>messages.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
81e91d6 to
3c29be2
Compare
| is_installed=$(which prlsrvctl) | ||
|
|
||
| if [[ $is_installed ]]; then | ||
| prlsrvctl update-license >/dev/null 2>&1 |
There was a problem hiding this comment.
i would put this as a sub command as the exit code if failed could interfere with the jamf
|
|
||
| if [[ $is_installed ]]; then | ||
| prlsrvctl update-license >/dev/null 2>&1 | ||
| license_activation_type=$(prlsrvctl info --license --json | plutil -extract activation_type raw -o - -) |
There was a problem hiding this comment.
is this a new field? on my macOS i get this
license_activation_type=$(prlsrvctl info --license --json | plutil -extract activation_type raw -o - -)
: Could not extract value, error: No value at that key path or invalid key path: activation_type
while the script would still work, the logs would be a bit strange
There was a problem hiding this comment.
Yes, activation_type is a new field in PD27 (not yet released)
3c29be2 to
f6ad244
Compare
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Checklist: