Skip to content
The Lazy Administrator
  • Home
  • Disclaimer
  • Contact
  • About Me
  • Search Icon

The Lazy Administrator

Finding ways to do the most work with the least effort possible

Set Corporate Lock Screen Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines

Set Corporate Lock Screen Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines

August 8, 2019 Brad Wyatt Comments 37 comments

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

Brad Wyatt
Brad Wyatt

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.


Intune, PowerShell
Automation, AutoPilot, Configuration Policy, Intune, PowerShell

Post navigation

PREVIOUS
Set Corporate Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines
NEXT
Configure Windows 10 Accent Color with Intune and PowerShell

37 thoughts on “Set Corporate Lock Screen Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines”

  1. Ran Christian says:
    August 12, 2019 at 11:00 am

    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.

    Reply
    1. Brad Wyatt says:
      August 19, 2019 at 7:35 am

      Im not sure what quiz or magnifying glass youre referring to, is this something on the photo itself?

      Reply
  2. Ran Christian says:
    August 19, 2019 at 2:30 pm

    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

    Reply
    1. Brad Wyatt says:
      August 20, 2019 at 8:12 am

      weird when I set the Lock Screen wallpaper I don’t get the spotlight anymore. Will have to do some testing in my lab

      Reply
  3. Vandrey Trindade says:
    September 18, 2019 at 11:18 am

    Brad Wyatt,
    Can this PowerShell script be used without Intune Policies?

    Reply
    1. Brad Wyatt says:
      September 18, 2019 at 11:22 am

      Yes

      Reply
      1. Vandrey Trindade says:
        September 18, 2019 at 11:31 am

        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!

        Reply
        1. Vandrey Trindade says:
          September 18, 2019 at 1:20 pm

          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?

          Reply
          1. Brad Wyatt says:
            September 18, 2019 at 1:21 pm

            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

          2. Vandrey Trindade says:
            September 18, 2019 at 1:23 pm

            Nice! I’ll try it! Thanks once again

  4. Vandrey Trindade says:
    September 20, 2019 at 1:15 pm

    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.

    Reply
  5. IntuneAdmin2000 says:
    October 18, 2019 at 6:43 am

    Can you do the same thing to deploy the lock screen as a slide show instead? If so, how?

    Reply
    1. Brad Wyatt says:
      November 18, 2019 at 9:58 am

      Not that I am aware of

      Reply
  6. Maarten De Clippeleir says:
    November 4, 2019 at 3:36 am

    I followed this. The image is in C:\MDM but the lock screen is not changing…

    Reply
    1. Brad Wyatt says:
      November 18, 2019 at 9:57 am

      Will need some more info – is the reg key set, do you see the image in the correct folder, etc

      Reply
      1. Gokul Nallasamy says:
        February 12, 2020 at 1:36 pm

        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 ??

        Reply
        1. Brad Wyatt says:
          February 17, 2020 at 11:47 am

          im hoping to get to this soon – create a new VM and test again and see what has changed

          Reply
          1. Gokul Nallasamy says:
            February 29, 2020 at 5:11 am

            I have used this script to apply lock screen for my whole organisation. But it only works for users who have admin rights.

          2. Eric says:
            April 17, 2020 at 10:05 am

            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.

          3. Brad Wyatt says:
            April 26, 2020 at 7:10 pm

            Yes I was working with someone on LinkedIn who had the issue – run this as x86 PowerShell

          4. Eric says:
            April 27, 2020 at 10:44 am

            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.

          5. Brad Wyatt says:
            April 27, 2020 at 12:50 pm

            does the reg key get changed

          6. Eric says:
            April 27, 2020 at 2:31 pm

            No it does not get changed. The reg did change for the desktop background but not changing for lock screen.

  7. Josh D says:
    November 21, 2019 at 6:59 am

    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?

    Reply
    1. Brad Wyatt says:
      November 21, 2019 at 9:36 am

      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

      Reply
  8. Martijn says:
    April 9, 2020 at 9:13 am

    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.

    Reply
    1. Shawn F says:
      April 18, 2020 at 4:30 pm

      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.

      Reply
      1. Brad Wyatt says:
        April 26, 2020 at 7:10 pm

        Run it with x86 powershell

        Reply
  9. Andy Jones says:
    July 28, 2021 at 9:56 am

    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

    Reply
  10. Lawrence says:
    August 28, 2021 at 9:00 am

    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?

    Reply
  11. Andrew says:
    October 14, 2021 at 4:07 pm

    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.

    Reply
  12. Ethan says:
    February 18, 2022 at 4:31 am

    This PowerShell script works well but is there a way to make the image stretch when applying.

    Reply
  13. Amir says:
    August 18, 2022 at 7:37 am

    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/

    Reply
  14. RaphBens says:
    April 20, 2023 at 3:59 am

    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

    Reply
  15. Vic says:
    May 1, 2023 at 6:51 am

    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.

    Reply
  16. Yogesh says:
    June 5, 2023 at 3:56 am

    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?

    Reply
  17. Renze says:
    July 17, 2024 at 3:08 am

    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.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe

Email


Categories

  • Active Directory (8)
  • AI (3)
  • API (1)
  • AutoPilot (2)
  • Azure (15)
  • Bicep (4)
  • Connectwise (1)
  • Defender for Cloud Apps (1)
  • Delegated Admin (1)
  • DevOps (6)
  • Graph (6)
  • Intune (15)
  • LabTech (1)
  • Microsoft Teams (6)
  • Office 365 (19)
  • Permissions (2)
  • PowerShell (50)
  • Security (1)
  • SharePoint (3)
  • Skype for Business (1)
  • Terraform (1)
  • Uncategorized (2)
  • Yammer (1)

Recent Comments

  • Kristopher Gates on Getting Started with GitHub Copilot in the CLI
  • MD SHARIQUE AKHTAR on Modern Active Directory – An update to PSHTML-AD-Report
  • TommyBoich on How The ConnectWise Manage API Handles Pagination with PowerShell
  • LOTTERY 365 LOGIN on Windows LAPS Management, Configuration and Troubleshooting Using Microsoft Intune
  • SPRUNKI PHASE 6 on Get a New Computer’s Auto Pilot Hash Without Going Through the Out of Box Experience (OOBE)

1,739,245 People Reached

© 2025   All Rights Reserved.