Smart Computer group with criteria for Network Service

EUC600
New Contributor III

Is there an easy way to use a smart computer group to target a network service?

For example: Send this policy to any MacBooks using networkservice "Thunderbolt Ethernet" Send this other policy to any MacBooks using networkservice "Apple USB Ethernet"

Thanks!

1 REPLY 1

mm2270
Legendary Contributor III

Not that Im aware of. There isn't a valid scoping mechanism built in to the JSS that would let you target machines in that way. While you could of course build an Extension Attribute to determine the active port, they can be inaccurate since they only get updated at inventory collection, and network connections can change very rapidly in the course of minutes or hours.

The only thing that comes to mind at the moment would be to have 3 (or more, depending how many you need) policies. One policy that would get scoped to all Macs that ran a script which determined the active network service or port, then called one of several other policies via custom trigger. So for example, if the script determined the Mac was on Thunderbolt Ethernet, it would so something like /usr/local/bin/jamf policy -trigger tboltenet If it saw it was on USB Ethernet, it could instead run /usr/local/bin/jamf policy -trigger usbenet or something. Each of those would need to correspond to a policy that would run whatever it is that you're looking to do.