Set Desktop Wallpaper for macOS Intune managed devices

Recently I blogged about configuring the device name of an Intune managed macOS Device.

Following on from this, I thought I would share how I was able to deploy a desktop wallpaper image to Intune managed macOS devices.

If you’re already deploying wallpapers to Intune managed Windows devices, then you will most likely have a wallpaper image in a publicly downloadable place (Azure Blob storage etc.). but if not, you will need to set this first.

Because I am already deploying and setting a wallpaper image for Windows devices, I will use the same wallpaper image and URL for deploying to my Intune managed macOS devices.

Microsoft have provided two files on their GitHub that enable this process.

  1. A shell script to download the wallpaper image from a URL specified and put it in the /Library/Desktop location on the macOS device.  The file name is set to Wallpaper.jpg.
  2. A mobileconfig profile file that sets the wallpaper using the location and wallpaper image file downloaded by the shell script.

I have downloaded both files to the following location.

You can modify both files to your choosing, but I prefer to keep things simple and only make a change to the variable wallpaperurl in the shell script.  For future updates of wallpaper images, only modifying wallpaperurl URL to a new image is required to deploy the new wallpaper.

The next step is to deploy the wallpaper image to the macOS devices

In Intune, navigate to Devices – macOS – Shell Scripts and click Add

Use an appropriate name and description – Click Next

Navigate to the location of the shell script

Select the script notification, frequency and maximum retry if script fails options and click Next

Note: I have set the script to run daily to so any future updates to the wallpaper image will occur within a day of updating the script.

Select an appropriate Group to deploy this to – I have an Azure AD Dynamic Group that contains all managed macOS devices

Review the summary and click Add

The script is added and will run on macOS devices being managed by Intune.

You can also check the status of the script.

Once the script has successfully run on the macOS device. the image file will be present in /Library/Desktop

The next step is to use the mobileconfig profile file and Intune to set the wallpaper.jpg file in /Library/Desktop as the desktop wallpaper image.

In Intune, navigate to Devices – macOS – Configuration profiles and click Create Profile

Select Templates as the Profile Type and Custom as the Template name and click Create

Use an appropriate name and description – Click Next

Give an appropriate Custom configuration profile name e.g. Set Desktop Wallpaper

Navigate to the location of the mobileconfig profile file

The XML content of the mobileconfig file will upload. Take note of the string line with the path and filename of the wallpaper image file.  Click Next

Select an appropriate Group to deploy this to – I will use the same Azure AD Dynamic Group that contains all managed macOS devices

Review and click Create

The next time the macOS devices sync with Intune, the desktop wallpaper is changed:

Before

After

One more additional step – but this will only work on Supervised macOS devices enrolled via Apple Business Manager or Apple School Manager

You can prevent users from changing the configured Wallpaper image by using a Device Restriction Configuration Profile, and configuring the Block modification of wallpaper setting to Yes

P.

2 Comments

  1. Chanchal Sharma

    May you share the script to implement corporate screen saver for macOS devices

    Like

  2. Hi there – No problem, the link to Microsoft Github is in the blog, but here it is again https://github.com/microsoft/shell-intune-samples/tree/master/Misc/Wallpaper

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s