FR: Add ability to specify a prefix or suffix to computer name based on HW type #47

Closed
opened 2026-01-19 18:31:21 +00:00 by michael · 1 comment
Owner

Originally created by @PhantomPhixer on GitHub.

A common scenario I find is my customers want to differentiate between desktops (iMac and macmini/studio) from laptops in the device name.
Examples: 12345-MACD - desktop and 12345-MACL.

It would be useful to include this in JSM rather than have to call in a policy.

You could have options based on the four main HW types:

  1. iMac
  2. mac mini
  3. mac studio
  4. macbook

allow more flexibility if required

Originally created by @PhantomPhixer on GitHub. A common scenario I find is my customers want to differentiate between desktops (iMac and macmini/studio) from laptops in the device name. Examples: 12345-MACD - desktop and 12345-MACL. It would be useful to include this in JSM rather than have to call in a policy. You could have options based on the four main HW types: 1. iMac 2. mac mini 3. mac studio 4. macbook allow more flexibility if required
michael added the wontfixenhancement labels 2026-01-19 18:31:21 +00:00
Author
Owner

@scriptingosx commented on GitHub:

Setup Manager offers a %model-short% substitution which is the first word of %model% so it can have the values Mac, MacBook or iMac.

You want to use D and L (presumably for 'laptop') to distinguish. Some else might want to use N for notebook (the term Apple is using for Macs with a battery) or B for book. Some other deployments might care to distinguish MacBook Air from MacBook Pro, but abbreviate as MBA and MBP Some might prefer uppercase characters and others lowercase.

You say there are four main hardware types, but are not listing the Mac Pro and are ignoring that there are two variants of MacBooks. (or is it four?)

There are endless combinations. We would have to implement massive options for string manipulation within the Setup Manager configuration profile to accommodate these wishes. (There is some basic manipulation to get leading and trailing characters, but that is where we want to leave it.) It would be close to implementing a programming language.

On the other hand, you can already run custom actions with a script in Setup Manager, through a shell action or a policy action. Within those scripts, you can manipulate the data and strings involved in any way you want.

I get the desire to do everything in Setup Manager and it is quite flattering. But every option we add is something we need to write, document, maintain, and support and at some point, we have to stop and say: you know what, you can customize this any way you want with a script. Do that. 😌

@scriptingosx commented on GitHub: Setup Manager offers a `%model-short%` substitution which is the first word of `%model%` so it can have the values `Mac`, `MacBook` or `iMac`. You want to use `D` and `L` (presumably for 'laptop') to distinguish. Some else might want to use `N` for notebook (the term Apple is using for Macs with a battery) or `B` for book. Some other deployments might care to distinguish MacBook Air from MacBook Pro, but abbreviate as `MBA` and `MBP` Some might prefer uppercase characters and others lowercase. You say there are four main hardware types, but are not listing the Mac Pro and are ignoring that there are two variants of MacBooks. (or is it four?) There are endless combinations. We would have to implement massive options for string manipulation within the Setup Manager configuration profile to accommodate these wishes. (There is some basic manipulation to get leading and trailing characters, but that is where we want to leave it.) It would be close to implementing a programming language. On the other hand, you can already run custom actions with a script in Setup Manager, through a `shell` action or a `policy` action. Within those scripts, you can manipulate the data and strings involved in any way you want. I get the desire to do everything in Setup Manager and it is quite flattering. But every option we add is something we need to write, document, maintain, and support and at some point, we have to stop and say: you know what, you can customize this any way you want with a script. Do that. 😌
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jamf/Setup-Manager#47