Forum Discussion
StuartK73
Feb 03, 2025Iron Contributor
Desktop Wallpaper Nightmares
Hi All
Is there or does anyone know of way to set the Desktop Wallpaper with the "FIT" option?
I've tried 2 methods:
- Device Restriction profile > Personalization
- Settings Catalogue > Desktop Wallpaper
The Device Restriction profile > Personalization only supports a publicly accessible URL with NO fit option
The Settings Catalogue > Desktop Wallpaper option does support an image deployed to C:\Windows\Web\Wallpaper path as well as fit, tile, centre options etc and this did work until I replaced the image but now produces a black desktop
What a nightmare trying to achieve a basic task
- StuartK73Iron Contributor
Thanks very much for this buddy.
Great to find someone who understands!
I'll check out the PS option.
Thanks again.
- aasimtekCopper Contributor
Yeah, setting a desktop wallpaper with the "Fit" option via Intune is a pain because Device Restriction Profile only allows a public URL and lacks scaling options, while Settings Catalog seems to have inconsistencies when updating the image.Here’s how you can properly set a wallpaper with the “Fit” option in Intune:
🔹 Solution: Use a PowerShell Script
Since Intune doesn’t fully support the "Fit" setting, you can deploy a PowerShell script via Intune to set the wallpaper and scaling mode manually.1️⃣ PowerShell Script to Set Wallpaper with "Fit" Option
powershell
Copy
Edit
$WallpaperPath = "C:\Windows\Web\Wallpaper\CustomWallpaper.jpg"# Set registry key for Fit option (value 6 = Fit)
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WallpaperStyle -Value 6
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name TileWallpaper -Value 0# Apply wallpaper setting
RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
2️⃣ Deploy the Script via Intune
Upload the wallpaper to C:\Windows\Web\Wallpaper (You can do this via a separate Intune script).
In Intune, go to Devices > Scripts > Add
Upload the PowerShell script
Set it to Run in the logged-on user's context
Assign it to the necessary devices
Restart Explorer.exe or log out and back in to apply changes
🔹 Alternative: Modify the Settings Catalog Deployment
If you must use Settings Catalog > Desktop Wallpaper, try these:
✅ Ensure the wallpaper file path is correct (check if it exists on the machine).
✅ Delete the old wallpaper and reapply policy (black screen may be due to a corrupt cached file).
✅ Force a Group Policy update:powershell
Copy
Edit
gpupdate /force
✅ Reboot the device after deploying the updated image.💡 Summary: Best Practices
Method Pros Cons
Device Restriction Profile Easy, no script needed No "Fit" option, requires a public URL
Settings Catalog Supports local files, fit options Buggy when updating wallpaper
PowerShell Script Full control, reliable Requires scripting & deployment
👉 Best Choice? Use PowerShell for full control & ensure the Fit setting is applied correctly.- StuartK73Iron Contributor
Oh, some further info.
These are Entra Joined Windows devices so GPO stuff is irrelevant here.
To get the latest wallpaper image to C:\Windows\Web\Wallpaper\ on the remote machines, I use 2 PS scripts and the desktop wallpaper image, packaged up as a Win32 app. This works well and provides notifications and logging.
So, going forward, instead of using the Setting Catalogue, I can use your PS script to set the image I have deployed via Win32?
This being the script?
$WallpaperPath = "C:\Windows\Web\Wallpaper\CustomWallpaper.jpg"
# Set registry key for Fit option (value 6 = Fit)
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WallpaperStyle -Value 6
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name TileWallpaper -Value 0# Apply wallpaper setting
RUNDLL32.EXE user32.dll, UpdatePerUserSystemParametersSK