find if machine is jamf enrolled or not

vkg
New Contributor III

I need to determine in my application if the client machine is jamf enrolled or not. finding presence of jamf binary is not enough, As i saw binary is present on machines which got enrolled long time back but is not enrolled any more.

4 REPLIES 4

ThijsX
Valued Contributor
Valued Contributor

Where do you want to create this check? in Jamf Pro / School or on the client itself ?

vkg
New Contributor III

We need this check on client, through a different application/script.

tsylwest
Contributor

This maybe obvious, so your mileage may vary, but ...

Open up Terminal and your best friend will usually be:

sudo jamf recon

If that connects, it's enrolled.

If you need more info, you could check what version of the jamf binary is running to make sure it's the same as your JSS (good sign if it's staying in sync):

jamf version

To show you which JSS the mac was configured to talk to you could run:

defaults read /Library/Preferences/com.jamfsoftware.jamf.plist jss_url

See if the registered JSS is available:

jamf checkJSSConnection

ThijsX
Valued Contributor
Valued Contributor

Or take a look at -> https://github.com/rtrouton/CasperCheck