I am attempting to use the worklet to set a login screen for Windows but was wondering if anyone had successfully changed the image source from a URL to an image uploaded into the worklet. If they have, could you please share the syntax used to replace this line?
# define the path to download the background image $ImageURL = 'https://www.automox.com/static/images/default-og-image.png'
This discussion is archived and closed to replies. Continue it in the Automox Community Slack.
When the Worklet’s remediation code runs, this will set the login background as my sourced mountain image:
*Note, that a log out or restart action would be required to see the changes made on the device.
Hope this helps! Let me know if you have any further questions.
J
JWillmsAugust 28, 2024
#2
Thanks for the reply! Do you know if there is a way to not use an image URL and an image file that is uploaded into the worklet and maybe copy and store it locally?
J
JohnG-AutomoxAugust 28, 2024
#3
Hi @JWillms ,
The Worklet in its current form doesn’t support setting the Login Screen Background from an image file attached to the Payload.
Never fear! I made some enhancements to the Remediation code to support this for you! You can find the new remediation code here in my Github repo.
If you want to see what changes were made to the script, essentially the previous download from a URL sections were replaced with what you see on lines 99 to 114.
Copy the new script and replace all of the existing remediation code with it. There is nothing to change in the evaluation code.
You’ll then want to upload your image file to the Worklet’s Payload. In my example, I am using this forest wallpaper I found here.
Again, only PNG, JPG, JPEG, BMP, TIF or GIF file extensions are supported here.
You’ll then want to update line 56 in the remediation code with the exact file name you uploaded to the Payload.
Example,
powershell1 line
$imagePayload = 'forest_wallpaper.jpg'
After making these changes, you can then run the Worklet manually or wait for its next scheduled remediation.
You should then see the results in your Activity Log:
After a logon or restart action, the new login background will be set:
Hope you find this valuable. Have a great day!
J
JWillmsAugust 28, 2024
#4
Sweet! This is exactly what I was looking for. Let give me this a shot. Appreciate the quick replies and assistance.
J
JWillmsAugust 28, 2024
#5
Closing the loop. Your changes worked perfectly. Thanks so much again. Have a great rest of the week.