Determining Hardware Type: Laptops or Desktops

Determining Hardware Type:

1) Laptop (Macbook)
2) Desktop

Script:
#!/bin/sh

HWModel="$(/usr/sbin/sysctl hw.model)"

if [[ $HWModel =~ .*MacBook*. ]]
then
/usr/local/bin/jamf policy -trigger LaptopSetup
else
/usr/local/bin/jamf policy -trigger DesktopSetup
fi

exit 0

Links:
https://community.jamf.com/t5/jamf-pro/scripts-for-use-with-custom-trigger-policies/m-p/177500

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Share via
Copy link