qagugl.blogg.se

Jamf pro variables
Jamf pro variables







jamf pro variables

Just repeat this for as many images in the Nature folder as you want. Save and refresh Self Service and now you have Earth and Leaf items.

#JAMF PRO VARIABLES UPDATE#

If you want to add Cactus, Leaf etc just duplicate the Policy change the Policy name to the image name, change in Self Service section as well and update the description and icon image and most importantly change the Parameter Script Values to Leaf.tif To check the image is updated Lock the screen, or close the lid and there you go the image is now the Earth.png close the lid and there you go the image is now the Earth.png Open up Self Service find your new like Change User Image to Earth item and click the Change button.Īfter a few seconds the policy is done. You can see here our $4 Parameter Variable Label we set in the Options section of the Script to help us out on the image names we can select.Ĭreate the Policy as a Self Service item and add a description and an icon that is the same as the image, I’ve also changed the button name to Change. Now set the Parameter Variable to one of the image names stated we will use Earth.png Set is as an ongoing Policy and give it a relevant name like Change User Image to Earth. Create a new Policy and add the Script payload to the Policy.

jamf pro variables

You can obviously change this to Sport or Fun etc.Īdd instructions in the Options section for our $4 Parameter as below so it’s easy to select one of these. Note in this example we are using images in the /Nature directory. The script needs the user ID so we change the picture of the logged in user and that is made a variable and added to the dscl commands to first delete the current image and then set the selected image. This lets us add the image name in the Policy Script Parameter Value setting so we can easily duplicate our policy and add in the image name. Let’s go through the script…First we set a Jamf Script Parameter Variable for $4 and use this in the script for the image name. create /Users/$userid Picture "/Library/User Pictures/Nature/$imagename" Userid=$(defaults read /Library/Preferences/ lastUserName)ĭscl. # Can be Cactus.tif Earth.png Leaf.tif Lightning.tif Nest.tif Sandollar.tif Snowflake.tif Zen.tif

jamf pro variables

# image name in the /Library/User Pictures/Nature/









Jamf pro variables