Skip to content

POS-44 Add scripts to read license activation type from PD#15

Merged
bineesh-n merged 1 commit into
mainfrom
add-fetch-activation-type-jamf-extension
May 20, 2026
Merged

POS-44 Add scripts to read license activation type from PD#15
bineesh-n merged 1 commit into
mainfrom
add-fetch-activation-type-jamf-extension

Conversation

@bineesh-n
Copy link
Copy Markdown
Collaborator

@bineesh-n bineesh-n commented May 19, 2026

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.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have performed a self-review of my own code
  • My changes generate no new warnings

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.xml reporting 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.

@bineesh-n bineesh-n force-pushed the add-fetch-activation-type-jamf-extension branch from 81e91d6 to 3c29be2 Compare May 19, 2026 14:46
is_installed=$(which prlsrvctl)

if [[ $is_installed ]]; then
prlsrvctl update-license >/dev/null 2>&1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would put this as a sub command as the exit code if failed could interfere with the jamf

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, right


if [[ $is_installed ]]; then
prlsrvctl update-license >/dev/null 2>&1
license_activation_type=$(prlsrvctl info --license --json | plutil -extract activation_type raw -o - -)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, activation_type is a new field in PD27 (not yet released)

@bineesh-n bineesh-n force-pushed the add-fetch-activation-type-jamf-extension branch from 3c29be2 to f6ad244 Compare May 20, 2026 10:23
@bineesh-n bineesh-n merged commit ba3972d into main May 20, 2026
1 check passed
@bineesh-n bineesh-n deleted the add-fetch-activation-type-jamf-extension branch May 20, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants