New Computer Provisioning (naming computers)

psherotov
Contributor

We have two Mac labs and I use pre-stage enrollment (which overall is a really nice way to deal with deployment). My issue is there isn't an option to name them during the setup process, so it's a lot of work to figure out which is which.

As part of the pre-stage enrollment settings, I have them bind to AD, create a local user account, etc.

I use ARD to do a lot of simple management during the day. and Mac's are numbered in a lab, so I can't leave them as imac (1) etc., which is how they show up in ARD and Jamf initially.

Any ideas on how to accomplish deploying new devices with names that isn't super complicated?

So far I've had to log in to each mac and get information (serial number, etc) and then cross reference in Jamf to find it and then edit the name and set change computer name to Jamf name. There's got to be a better way...hopefully :)

7 REPLIES 7

cbrewer
Valued Contributor II

psherotov
Contributor

@cbrewer That's a cool script you wrote. Problem is under pre-stage enrollment I don' t see where I can add a script. Forgive me if I'm being a little dense, but how can I get that script to run during pre-stage enrollment process and how can I scope it if the device hasn't been enrolled? As part of the pre-stage enrollment I have it specified in settings to bind using <name of group>-$SERIALNUMBER, if I can get the script to run during the pre-stage enrollment I could bind it using the computer name I set in the dialog box.

cbrewer
Valued Contributor II

You need to use a policy in Jamf Pro and have the trigger set to enrollment. Policies set to enrollment trigger run right after enrollment is complete.

psherotov
Contributor

@cbrewer Thanks again for the quick responses as I'm juggling multiple IT tasks :)

What would I scope the policy to? and if it runs after enrollment, wouldn't the AD binding be complete by that point?

cbrewer
Valued Contributor II

I'd scope the policy to just the machine(s) you are testing with to start. As for AD binding, you'd probably want to take it out of your pre-stage settings and do the AD binding as part of the naming script using dsconfigad or the jamf binary.

Not applicable

Here is what is working for me:

1 - Configured a config profile with my AD Bind settings
2 - Set up a policy with a script to name the Macs using desired naming conventions
3 - Scope the policy to a smart group based on the serial numbers of the Macs I want to name ( or just all Macs )
4 - Scope the AD Bind Config profile to a smart group of Macs with the names "Like" the desired Macs.

This allows me to be sure that the binding config profile doesn't even try to bind until the Mac is named correctly, which can then use the $COMPUTERNAME as the Client ID.

Look
Valued Contributor III

If you have any kind of database of serial to name, create a web API or even just a file share and have machines pull their data during enrollment and then name themselves, obviously you would be using a script for this.
Also I know JAMF were working on importable CSV format serial to name files for pre-enrollment, has this been implemented yet?