Posted on 06-05-2015 01:10 PM
Hi - I'm looking for a way to force a device check-in on Casper (9.72). Whether its hidden somewhere on Casper or a script I can manually run on the device to check in.
Thanks
Posted on 06-05-2015 01:16 PM
There's no way to force a check in from the JSS console, but if you have physical access to the machine and an admin account, you can run
sudo jamf policy
which will force the machine to check in.
Posted on 06-05-2015 01:40 PM
What @kitzy posted is correct. This will make the Mac check in, but bear in mind it will also make the Mac run any policies that are based on the Recurring Check-in trigger that are in scope at the time.
If all you want is for the Mac to update its Last Check-in field in the Casper record, you can also just do:
sudo jamf log
That simply updates the Last Check-in timestamp, but doesn't make any policies run. its a little unclear what you actually meant by making the Mac 'check in' so I just wanted to put that out there in case.
Posted on 09-30-2015 09:04 AM
I realize this thread is a few months old, but... You can run those commands without physical access via Casper Remote, can't you?
Posted on 09-30-2015 09:12 AM
You can run the command via Casper Remote only if the computer still has the same IP as it did when it last checked in. if you have Apple Remote Desktop or know the IP and can SSH into it, that would be the most reliable way of doing it.
Posted on 03-08-2016 11:45 AM
sudo jamf recon - will invoke the RECON to run inventory . - it works "locally!"
but here is a strange part:
I can SSH into the remote client then run "sudo jamf recon" and it will update the JSS. but why can't I run either sudo jamf recon or "jamf recon" as a root via the ARD? Apple Remote Desktop? It baffles me slightly since, as we all know ARD , all it does it uses the SSH to connect to machine and run commands (in the most simplistic terms)
does anybody know what is the command to force machine inventory from Apple Remote Desktop?
Thank You!
Posted on 03-08-2016 11:50 AM
@ChicagoGuy1984 put the full path to the binary in your ARD command and it should work. I think the reason it doesn't work without it is because ARD doesn't know the path to it.
Posted on 03-08-2016 11:52 AM
@ChicagoGuy1984 Not sure what version of JSS or OS X you are running but I am currently running 9.81 and mainly 10.X machines, so the binaries for jamf moved and you now have to specify it like this in ARD:
/usr/local/jamf/bin/jamf recon
Posted on 03-08-2016 12:02 PM
sudo /usr/local/bin/jamf displayMessage -message "HELLO NEWMAN"
This still will not work!!!! =) (again it works locally as is pasted above) but once I put it in "Unix Command" under ARD - it does not - But pointing out that it may need full path was a great idea!
Posted on 03-08-2016 12:05 PM
@ChicagoGuy1984 Ok, I just tested via ARD and it worked successfully for me. You don't need the "sudo" in front of the command since you can specify, "Run Command as", check "User", enter "root"
It worked fine for me just like this in ARD:
/usr/local/jamf/bin/jamf displayMessage -message "HELLO NEWMAN"
run as root
Posted on 03-08-2016 12:20 PM
Yes, i did a quick test of my own ... i may have picked a strange one , requiring an interactive session on the computers - although i did log on with a user ans still NO "MESSAGE popup
but this command works just fine:
/usr/local/bin/jamf recon
from my experience i run all my Short unix commands in ARD, and if i leave /sudo or no sudo , both work (of course running as ROOT selected)
Thanks All for your help!
Posted on 03-08-2016 12:24 PM
@ChicagoGuy1984 Interesting. Glad we could help!
Cheers
Posted on 06-23-2017 01:07 PM
I realize this thread is old, but is there a problem with the following approach:
Create a policy with no package but with "jamf recon" in the Execute Command section, which should run as root
Scope that policy how you want (all computers? yikes!, but to a smart group on recurring checkin)
Obviously you want folks to automatically drop out of the smart group at recon, or make sure you turn off that policy manually!
Voila?
Posted on 06-23-2017 01:11 PM
Obviously #2, I'm talking about 'recon,' not 'policy'
Posted on 09-26-2017 02:39 PM
Thank you for the solution. This is very helpful.
Posted on 01-04-2018 04:54 PM
I like "sudo jamf manage", gives me a clear message in terminal that a check to the JSS was attempted.