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

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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