Change Windows Desktop Wallpaper With a Custom Command

Some organizations require that all of the company's managed Windows devices have custom wallpaper set as the desktop background. This article shows you how to use a command template to apply a custom wallpaper.

Prerequisites:

  • You need a managed device running on a supported OS to create a command.

Considerations:

  • This command will also update the lock screen.
  • You can visit our Github link for more information about this command here

To create the Windows command:

  1. Log in to the JumpCloud Admin Portal.
  2. Go to DEVICE MANAGEMENT > Commands.
  3. Click ( + ), then choose Command from Template.
  4. Select the Windows tab.
  5. From the list, select Windows - Change Lock Screen & Desktop Background | v1.0 JCCG and click configure.
  6. Replace the first 3 lines with below at the beginning of the command body:

LockscreenUrl = "https://your-image-url/lockscreen.jpg"
$wallpaperUrl = "https://your-image-url/background.jpg"

$BackgroundSource = "C:\Windows\temp\background.jpg"
$LockScreenSource = 'C:\pathToImages\lockImage.jpg'
Invoke-WebRequest -Uri $wallpaperUrl -OutFile $BackgroundSource
Invoke-WebRequest -Uri $LockscreenUrl -OutFile $LockScreenSource

  1. Under Event, choose Run Manually.
  2. (Optional) Under Timeout After and Time to Live Settings, adjust the times to your preference.
  3. Select the Devices or Device Groups tab, then bind the command to the device or group where you want to set the wallpaper.
  4. Click Save.
  5. Find the newly created command in the commands list and click Run Now to send the image to the device or group of devices. 
Back to Top

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case