Set Corporate Lock Screen Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines
In my previous article I showed you how you can leverage PowerShell and Intune to set a computers wallpaper even if the OS was not Enterprise or Education. Currently, If you want to set the wallpaper or lock screen wallpaper via Intune Policies, you must be on either Enterprise or Education. In this article I will show you how you can leverage PowerShell and Intune, and set your own lock screen wallpaper no matter the version.
In my example I will use Intune to set the lock screen image of my end user machines to the following image:
First, we need to create a PowerShell script that will do the following:
- Download the wallpaper
- Store the wallpaper locally on the target machine
- Set the lock screen wallpaper
In my example, I want to set my wallpaper as the following image: https://www.thelazyadministrator.com/wp-content/uploads/2019/07/nicewall.jpg, which will be named wallpaper_LazyAdmin.jpg and stored at C:\MDM. If the directory is not present it will create it, and if the proper registry keys are not found it will create them as well.
$RegKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" $LockScreenPath = "LockScreenImagePath" $LockScreenStatus = "LockScreenImageStatus" $LockScreenUrl = "LockScreenImageUrl" $StatusValue = "1" $url = "https://www.thelazyadministrator.com/wp-content/uploads/2019/07/nicewall.jpg" $LockScreenImageValue = "C:\MDM\wallpaper_LazyAdmin.jpg" $directory = "C:\MDM\" If ((Test-Path -Path $directory) -eq $false) { New-Item -Path $directory -ItemType directory } $wc = New-Object System.Net.WebClient $wc.DownloadFile($url, $LockScreenImageValue) if (!(Test-Path $RegKeyPath)) { Write-Host "Creating registry path $($RegKeyPath)." New-Item -Path $RegKeyPath -Force | Out-Null } New-ItemProperty -Path $RegKeyPath -Name $LockScreenStatus -Value $StatusValue -PropertyType DWORD -Force | Out-Null New-ItemProperty -Path $RegKeyPath -Name $LockScreenPath -Value $LockScreenImageValue -PropertyType STRING -Force | Out-Null New-ItemProperty -Path $RegKeyPath -Name $LockScreenUrl -Value $LockScreenImageValue -PropertyType STRING -Force | Out-Null RUNDLL32.EXE USER32.DLL, UpdatePerUserSystemParameters 1, True
TIP: Because we are modifying the PersonalizationCSP key, users will see that the lock screen image is managed by Group Policy
When you modify the PowerShell script to fit your corporate needs, save it locally as we will need to import it into Intune.
In the Azure Portal, navigate to Intune > Device Configuration > PowerShell scripts and press “+ Add” to add a new PowerShell configuration script
In the Basics section, give your policy a valid Name and Description and then press Next
In the Script Settings section, specify the PowerShell script file we created and saved up above
In the Scope Tags section, configure any scope tags for the policy. I do not have any scope tags so I will press Next
In the Assignments section, I will assign this policy to my “Intune Devices” group. You can apply this to any group you prefer. Once you have assigned the policy to the correct group(s) press Next
Finally, in the Review + Add section, review your new configuration policy. If it is set up to your enterprises needs, press Add.
On my target machine I can see that the policy applied as my lock screen wallpaper is the image specified

My name is Bradley Wyatt; I am a 5x Microsoft Most Valuable Professional (MVP) in Microsoft Azure and Microsoft 365. I have given talks at many different conferences, user groups, and companies throughout the United States, ranging from PowerShell to DevOps Security best practices, and I am the 2022 North American Outstanding Contribution to the Microsoft Community winner.
37 thoughts on “Set Corporate Lock Screen Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines”
Thank you for share this, “Set Lock Screen Wallpaper”. However, mine still has the words, a long with the magnifying glass to “Take the quiz”. How do I remove that? Any help would be great.
Thank you in advance.
Im not sure what quiz or magnifying glass youre referring to, is this something on the photo itself?
I believe the wording is Windows Spotlight. Here is the link to an image of what I am talking about.
https://images.app.goo.gl/3GfweGBVweqKdMgo7
weird when I set the Lock Screen wallpaper I don’t get the spotlight anymore. Will have to do some testing in my lab
Brad Wyatt,
Can this PowerShell script be used without Intune Policies?
Yes
Thanks! I have tried it on my Windows 10 Pro work PC.
I’ll create a GPO to set those registry keys.
Thanks a lot!
Brad,
I’ve created the GPO to copy the file to the computers, create the registry keys and set their values.
The only thing I missed was that last command “rundll32.exe…”
That’s the command that activates it?
I ran it manually on the computers after the GPO ran and there’s only a blue screen, not the image…
Anything I’m missing?
If you’re doing GPO I wouldn’t do the GPO to run the script but use the GPO to set the reg keys. After reboot it should be configured
Nice! I’ll try it! Thanks once again
The problem is only Windows Spotlight.
If it isn’t set before you apply this config, you are ok. But Spotlight is turned on by default on Windows 10 Pro…
Since there’s no way to disable Spotlight on Windows 10 Pro using GPO, I’m back again to square one.
Can you do the same thing to deploy the lock screen as a slide show instead? If so, how?
Not that I am aware of
I followed this. The image is in C:\MDM but the lock screen is not changing…
Will need some more info – is the reg key set, do you see the image in the correct folder, etc
Same thing happened to me. Images are stored in the correct folder but the lock screen is not changing. If I login as administrator on the device then the lock screen is getting applied. So user should have admin rights on the device to make this work ??
im hoping to get to this soon – create a new VM and test again and see what has changed
I have used this script to apply lock screen for my whole organisation. But it only works for users who have admin rights.
Just wondered if there was a fix for this as I’m expiriencing the same issue except the lock screen will not show for any user. I have admin rights. The reg key isn’t getting set. It worked for desktop wallpaper.
Yes I was working with someone on LinkedIn who had the issue – run this as x86 PowerShell
Thanks for the response. I recreated the script using Power Shell x86 and I made sure ” Run script in 64 bit PowerShell Host” is set to No. Intune states it succeeded but I’m still not seeing it in my registry and lock screen isn’t changing. The picture gets added to the C:\MDM folder.
does the reg key get changed
No it does not get changed. The reg did change for the desktop background but not changing for lock screen.
Thank you for this, one question is the part: “TIP: Because we are modifying the PersonalizationCSP key, users will see that the lock screen image is managed by Group Policy”, how do we allow users to change the lock screen? I assume its a change on the registry key?
Since this is the key GPO modifies you will see that warning saying GPO is managing it. There is another key to set the wallpaper which will allow the user to change it but I have not found one that does the same for the lockscreen. You may be able to deploy it then deploy another policy to delete the key after it gets applied. Not sure if the wallpaper you had set with cache and still work or if it will just be black because its NULL
Can somebody confirm that this works without admin priviledges? I am seeing the local directory and the file in it, but the background doesn’t appear. I believe this is because writing to the register requires administrator priviledges and our users don’t have those.
Martijn, I’m having the same issue. The script works great when running with Admin Privileges, but it looks like Intune is not running the script in Admin Privileges so it doesn’t have the rights to get the Reg Keys. I’m still trying to figure that out.
Run it with x86 powershell
Thanks Brad
I deployed this to my Win 11 desktop and it worked fine but I had to configure the script in Intune to – Run this script using the logged on credential AND -Run script in 64 bit PowerShell Host
Brad,
Hi. Is there a way to create an exe file that would copy the corporate wallpaper and remove the windows img0.jpg and replace it with the corporate wallpaper inside the exe? I’m thinking 7zip might be able to do that.
Here’s what I currently have in mind in the exe file:
folder container the corporate wallpaper
batch with the following commands:
akeown /f c:\windows\WEB\wallpaper\Windows\img0.jpg
takeown /f C:\Windows\Web\4K\Wallpaper\Windows\*.*
icacls c:\windows\WEB\wallpaper\Windows\img0.jpg /Grant Administrators:(F)
icacls C:\Windows\Web\4K\Wallpaper\Windows\*.* /Grant Administrators:(F)
del c:\windows\WEB\wallpaper\Windows\img0.jpg
del /q C:\Windows\Web\4K\Wallpaper\Windows\*.*
copy “%~dp0img0.jpg” c:\windows\WEB\wallpaper\Windows\img0.jpg
copy “%~dp04k\*.*” C:\Windows\Web\4K\Wallpaper\Windows
Is that doable or more practical for oobe machine?
Can this be modified to change the lock screen into a slideshow? It seems Microsoft made it much harder to setup lock screen slideshows via registry.
This PowerShell script works well but is there a way to make the image stretch when applying.
This solution worked for my admin rights enabled for my account machine but not for others. But this one worked for me https://osddeployment.dk/2019/04/14/how-to-set-windows-10-lock-screen-and-background-picture-with-intune/
Hello Brad,
Thank you for sharing that.
But in my case i want to deploy from url so i did it :
New-Item HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP -Force
#Variable Creation
$RegPath = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP”
$LockscreenImageURL = ‘https://www.xxxx.png’
#Create image directory
md $ImageDestinationFolder -erroraction silentlycontinue
#Download image file
Start-BitsTransfer -Source $BackgroundImageURL -Destination “$Backgroundimage”
Start-BitsTransfer -Source $LockscreenImageURL -Destination “$LockScreenimage”
#Lockscreen Registry Keys
New-ItemProperty -Path $RegPath -Name LockScreenImagePath -Value $LockScreenImage -PropertyType String -Force | Out-Null
New-ItemProperty -Path $RegPath -Name LockScreenImageUrl -Value $LockScreenImage -PropertyType String -Force | Out-Null
New-ItemProperty -Path $RegPath -Name LockScreenImageStatus -Value 1 -PropertyType DWORD -Force | Out-Null
It’s working well but i did it manually it is possible to automate ? and change the check-in status in Intune
I was deploying this in a test enviroment. I also ran into the issue, that the folder was created and the image was downloaded, but no registry keys added.. Until
I changed the “Run script in 64 bit PowerShell Host” from ‘No’ to ‘Yes’ (in the script properties in Intune) and it worked after next reboot.
Hello Brad,
This script is working for me but just want one update from your that if I want to update the image on weekly biases is there any way except changing the path?
Thanks for this, our customer accounts are M365 Business Premium licensed, and hence this includes Window 11 Business as the licensed OS ‘upgrade’ from Pro.
Have tested this script and it works on 11 Business x64.
Our script settings…
Run this script using the logged on credentials;
No
Enforce script signature check;
No
Run script in 64 bit PowerShell Host;
Yes
Question, if we needed to change the lock screen image itself – do we just change the image URL to ‘image.png’, directing to the new hosted image file?
Will the script overwrite the existing ‘image.png’ file already stored locally on the endpoint Windows device? Or will it create a new image such as ‘image(1).png’?
We need to change lock screen images each calendar month etc.