, ,

Setting Corporate Wallpapers and Lockscreens via Intune: A Complete Guide

by

If you’ve landed here, chances are you’ve been frantically searching Google, frustrated by Intune’s inability to define lockscreen and wallpaper settings as expected. Trust me, I’ve been there too—it’s incredibly frustrating. Or you here because this blog came in as special request!

After some searching, you’ve probably discovered that this functionality is only supported on Windows 10/11 Enterprise editions, not Pro or Business. That realization leads to an important question:

How do you deliver consistent business branding for your devices, especially in hybrid or cloud-only environments?

Why Business Branding Matters

While it might seem minor, corporate branding is essential. Your company’s reputation is built on a recognizable and professional image, and even details like lockscreen and desktop backgrounds contribute to maintaining that focus.

Two Ways to Achieve This via Intune

  1. Intune Scripts
  2. Win32 App Packages

Why Scripts Fall Short

While Intune scripts can set wallpapers, they come with significant drawbacks:

  • One-time execution: Scripts typically run once, meaning updates require re-deployment. Remediation scripts can re-run but require enhanced licenses.
  • Limited reporting: Reporting for scripts is much weaker compared to Win32 Apps.
  • No version control: Changes aren’t easily tracked or managed.
  • Storage costs: Images must be saved in a shared location (e.g., Azure Files), which can lead to ongoing costs.
  • Connectivity dependency: Remote loading means a lost internet connection could impact users.

In short, while scripts can get the job done, they’re not the most scalable or robust solution.

Why Win32 App Packages Are Better

Using Win32 App packages overcomes these challenges and offers numerous advantages:

  • Version control: Easily manage updates by incrementing the app version.
  • Comprehensive reporting: Monitor deployment and success rates via Intune’s built-in tools.
  • Local storage: Images are packaged and stored locally, reducing dependency on shared locations or internet access.
  • Uninstallation: Manage devices out of scope with uninstall commands.
  • Consistency: Branding remains intact across updates and reassignments, making it easier to deliver unique branding per team or department.

How to Deploy Wallpapers and Lockscreens Using Intune Win32 App

For the full guide, head over to my GitHub repository, where you’ll find the necessary files and scripts. Below is a concise step-by-step summary:

Requirements

  • Windows 10+
  • Microsoft Intune
  • 10MB disk space + image size

Instructions

  1. Prepare the App Package
    • Extract the PowerShell script and assets folder to C:\Win32Apps\Wallpaper\.
    • Replace Lockscreen.jpg and Desktop.jpg with your corporate images (same names, .jpg format).
    • Use the Microsoft Win32 Content Prep Tool (download at https://go.microsoft.com/fwlink/?linkid=2065730) to package the app:
      • Setup folder: C:\Win32Apps\Wallpaper\
      • Setup file: install.ps1
      • Output location: C:\Win32Apps\Wallpaper\
  2. Create the App in Intune
    • Go to Apps > Windows > Add in Intune.
    • Select Windows app (Win32) and upload your packaged .intunewin file.
    • Configure app details:
      • Name: Company Branding
      • Description: Background & Lockscreen branding deployment app
      • Publisher: Warren Sherwen
      • App version: 1.0 (increment with updates).
  3. Set Installation and Uninstallation Commands
    • Install command: %windir%\SysNative\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -file install.ps1 -Mode Install
    • Uninstall command:%windir%\SysNative\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -file uninstall.ps1 -Mode Install
    • Ensure PowerShell runs in 64-bit mode (SysNative) to avoid registry key issues.
  4. Define Detection Rules
    • Use a custom detection script (check.ps1).
  5. Assign Deployment Scope
    • Target all devices or tailor deployment to specific groups as needed.
  6. Review and Finish

Pro Tips for Multiple Brands

If you’re managing unique branding for teams or departments:

  • Adjust the values in install.ps1:$WallpaperImage = "Desktop.jpg" $LockscreenImage = "Lockscreen.jpg"
  • Modify check.ps1 to align with these changes. This ensures branding follows users as they change teams.

Fantastic, you now have branding deployed via Intune!

(Fantastisch, Sie haben jetzt die Branding-Bereitstellung über Intune abgeschlossen!)

Param(
	[Parameter(Mandatory=$true)]
	[ValidateSet("Install", "Uninstall")]
	[String[]]
	$Mode
	)
	# Author: Warren Sherwen
	# Verison: 1.0

	# Defines the log file location.
	$Logfile = "$env:systemdrive\Temp\Logs\companybranding.log"

	# LogWrite Function.
	Function LogWrite{
	   Param ([string]$logstring)
	   Add-content $Logfile -value $logstring
	   write-output $logstring
	}

	function Get-TimeStamp {
		return "[{0:dd/MM/yy} {0:HH:mm:ss}]" -f (Get-Date)
	}

	if (!(Test-Path "$env:systemdrive\Temp\Logs\"))
	{
	   mkdir $env:systemdrive\Temp\Logs
	   LogWrite "$(Get-TimeStamp): Company Branding script has started."
	   LogWrite "$(Get-TimeStamp): Log directory created."
	}
	else
	{
		LogWrite "$(Get-TimeStamp): Company Branding script has started."
		LogWrite "$(Get-TimeStamp): Log directory exists."
	}

$DesktopLocation = "$env:systemdrive\Background\Desktop.jpg"
$LockscreenLocation = "$env:systemdrive\Background\Lockscreen.jpg"

$WallpaperImage = "Desktop.jpg"
$LockscreenImage = "Lockscreen.jpg"

$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP"
$BackgroundPath = "DesktopImagePath"
$BackgroundStatus = "DesktopImageStatus"
$DesktopUrl = "DesktopImageUrl"
$LockScreenPath = "LockScreenImagePath"
$LockScreenStatus = "LockScreenImageStatus"
$LockScreenUrl = "LockScreenImageUrl"
$StatusValue = "1"

If ($Mode -eq "Install") {
    if (!(Test-Path "$env:systemdrive\Background")) {
	   mkdir $env:systemdrive\Background -Force
	}
	else{

	}

    New-Item -Path $RegistryKeyPath -Force -ErrorAction SilentlyContinue

    if (!$LockscreenImage -and !$WallpaperImage){
        LogWrite "$(Get-TimeStamp): Niether the lockscreen or background have values set."
    }
    else{

        if ($LockscreenImage){
            LogWrite "$(Get-TimeStamp): Copying lockscreen ""$($LockscreenImage)"" to ""$($LockscreenLocation)"""
            Copy-Item ".\Images\$LockscreenImage" $LockscreenLocation -Force
            LogWrite "$(Get-TimeStamp): Creating regkeys for lockscreen"
            New-ItemProperty -Path $RegistryKeyPath -Name $LockScreenStatus -Value $StatusValue -PropertyType DWORD -Force
            New-ItemProperty -Path $RegistryKeyPath -Name $LockScreenPath -Value $LockscreenLocation -PropertyType STRING -Force
            New-ItemProperty -Path $RegistryKeyPath -Name $LockScreenUrl -Value $LockscreenLocation -PropertyType STRING -Force
        }
        if ($WallpaperImage){
            LogWrite "$(Get-TimeStamp): Copying wallpaper ""$($WallpaperImage)"" to ""$($DesktopLocation)"""
            Copy-Item ".\Images\$WallpaperImage" $DesktopLocation -Force
            LogWrite "$(Get-TimeStamp): Creating regkeys for wallpaper"
            New-ItemProperty -Path $RegistryKeyPath -Name $BackgroundStatus -Value $StatusValue -PropertyType DWORD -Force
            New-ItemProperty -Path $RegistryKeyPath -Name $BackgroundPath -Value $DesktopLocation -PropertyType STRING -Force
            New-ItemProperty -Path $RegistryKeyPath -Name $DesktopUrl -Value $DesktopLocation -PropertyType STRING -Force
        }  
    }
    LogWrite "$(Get-TimeStamp): Script has been completed."
    exit
}

If ($Mode -eq "Uninstall") {
    if (!$LockscreenImage -and !$WallpaperImage){
    LogWrite "$(Get-TimeStamp): Niether the lockscreen or background have values set."
}
else{
        if ($LockscreenImage){
            LogWrite "$(Get-TimeStamp): Removing the registry keys and file for the lockscreen"
            Remove-ItemProperty -Path $RegistryKeyPath -Name $LockScreenStatus -Force
            Remove-ItemProperty -Path $RegistryKeyPath -Name $LockScreenPath -Force
            Remove-ItemProperty -Path $RegistryKeyPath -Name $LockScreenUrl -Force
            Remove-Item $LockscreenLocation -Force
        }
        if ($WallpaperImage){
            LogWrite "$(Get-TimeStamp): Removing the registry keys and file for the background"
            Remove-ItemProperty -Path $RegistryKeyPath -Name $BackgroundStatus -Force
            Remove-ItemProperty -Path $RegistryKeyPath -Name $BackgroundPath -Force
            Remove-ItemProperty -Path $RegistryKeyPath -Name $DesktopUrl -Force
            Remove-Item $DesktopLocation -Force
        }  
    }
    LogWrite "$(Get-TimeStamp): Script has been completed."
    exit
}

Leave a Reply

Discover more from The Daily Waffle

Subscribe now to keep reading and get access to the full archive.

Continue reading