Category filter

Script to set Wallpaper on Windows

Hexnode UEM automates the execution of proactive IT tasks on Windows with the help of
custom scripts
. For example, you can create Batch file scripts or PowerShell scripts to perform necessary operations, which can be executed on the devices remotely from the Hexnode console.

This doc helps you create custom scripts to change the desktop wallpaper on Windows devices.

Note:


Supported Versions:

The scripts given below will be supported on the following versions:

  • Windows 10 v1607+ (Pro, Enterprise, Education)
  • Windows 11 (Pro, Enterprise, Education)

Disclaimer:

The sample scripts provided below are adapted from third-party open-source sites.

PowerShell script to set the wallpaper

Script to set wallpaper remotely on Windows executed successfully from Hexnode.

Replace file path in the $filePath parameter with your actual file path and ensure the wallpaper image exists on the device by the specified name at the designated path. Since the script works on this image, its unavailability can cause the action to fail. Also, it requires a restart action for the changes to be reflected on the device.

How to View Script Output in Hexnode

To review the execution results, navigate to the Action History tab of the specific device in your Hexnode UEM portal. Locate the script entry in the Subject column and click the Show Output button next to the status field to view the returned data.

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

Sample Script Repository