Enrolling macbook to JamfPro via Script

BlackTiger
New Contributor

Hi,

Calling all jamf script superheroes... 

I am a newbie to scripting, I want to make a script to enroll computers to JamfPro and then add the computer to a specific static group. Could any one please share/help if you have a working script handy? 

I managed to make one but I am stuck with downloading the CA and enrollment profile config files. If I managed to download those two config files, I have to install it manually by clicking them and then the script continues and moves the computer to a specific static group, then a binding profile is pushed and the computer get binded to local AD. 

@greatkemo Is this a piece of cake for you? 

Thanks

3 REPLIES 3

jamf-42
Valued Contributor II

you enrol Macs via ADE / ABM or invite <- don't do that.. anything else is a hack and is 'a very bad idea' 

oh.. and never use static groups.. there be madness (and an overhead) 

 

 

AJPinto
Esteemed Contributor

Just to also toss my 2 cents in here. You can’t enroll devices via script anymore, apple broke that with macOS 10.15 several years back.
As far as the Static groups, that can done with API but depending on what you are needing and why it may not be worth the effort and could be better served with a smart group. AD binding is also not a good idea with macOS for most use cases.

In the end, what are you trying to accomplish? There may be another way to get where you need to be.

sdagley
Esteemed Contributor II

I'll 2nd @jamf-42 comment on enrollment (there can be use cases for Static Groups :-) ) and add that it is by design that you cannot script the installation of the CA and enrollment Configuration Profile because Apple considers both of those to be user privacy issues.