Locate a missing computer

New Contributor II

What are the latest steps for locating a missing computer that's still calling back to the JSS? It would be helpful to see the current WiFi network name, public IP, and geolocation would be great. 



This won't get you exact location, but you'll get the region based on the ISP. It's at least enough to let you know the computer is somewhere on campus or gone overseas.


You can add this to the last echo command to include the current wi-fi SSID:

$( /usr/sbin/networksetup -getairportnetwork en0 )

Beyond that, Apple's privacy settings won't allow you to install any tracking software without alerting whoever's holding the computer. If you feel the device is in the wrong hands, pass this information along to the police and let them handle it from there. Likely, it won't be worth the effort to retrieve legally and you should chalk it up as irrecoverable.


IF a device is calling back into JSS, and it isn't a 'server', then it is likely that the device is in use by a real person.

I suggest lock the device with a message to contact IT, and they'll be in touch with you cause they can't work. Then you'll find your Mac.

New Contributor

This is perfect. 

I have a missing computer currently that last checked in on a Verizon IP address in the users home town, I want to confirm that this laptop is in their home so the ability to show the SSID would be fantastic, but after adding this script I'm seeing machines check in and my new field under Extension Attributes is displayed but it's empty.  My other Extension Attributes are working (i.e. battery health).  Is there something in the script that needs modified to run since this was last posted?

I think the syntax of the networksetup command is screwing it up:

$( /usr/sbin/networksetup -getairportnetwork en0 )

Running it in bash or zsh as

networksetup -getairportnetwork en0

Returns the desired result (obscured because SeCuRiTy)


~ % networksetup -getairportnetwork en0
Current Wi-Fi Network: ***********


Though my scripting knowledge escapes me today and I cannot figure out how to get it to work with this one.

I've tried the following variations within the script, though it appears that that section of the script calls exclusively for variables, thereby interpreting the command as a variable itself:

$( /usr/sbin/networksetup -getairportnetwork en0 )
networksetup -getairportnetwork en0
$(networksetup -getairportnetwork en0
/usr/sbin/networksetup -getairportnetwork en0

But with the networksetup command outside of the result tags, the script does execute and produce a result successfully, just without the networksetup command lol