mirror of
https://github.com/jamf/Setup-Manager.git
synced 2026-02-03 14:13:24 +00:00
FR: Add ability to specify a prefix or suffix to computer name based on HW type #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
allow more flexibility if required
@scriptingosx commented on GitHub:
Setup Manager offers a
%model-short%substitution which is the first word of%model%so it can have the valuesMac,MacBookoriMac.You want to use
DandL(presumably for 'laptop') to distinguish. Some else might want to useNfor notebook (the term Apple is using for Macs with a battery) orBfor book. Some other deployments might care to distinguish MacBook Air from MacBook Pro, but abbreviate asMBAandMBPSome 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
shellaction or apolicyaction. 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. 😌