If you are creating a Windows 10 image, you will benefit from using a PowerShell script to change the lock screen and desktop background to ensure that all the desktops in your environment are uniformly configured to have the same settings. In this particular example, our PowerShell script is going to look something like this:
The value in quotes next to $Wallpaper and $Lockscreen should match the name of the file you are planning to use for the background and lock screen.
In your C:\ drive, create a folder named ‘background’ and copy the files of the background and lock screen images into this folder. Also, copy the file containing your PowerShell script into this folder.
Next, open an administrator PowerShell prompt and type the following command:
Enter Y at the prompt.
Now, type the following commands in PowerShell:
cd c:\ background
(Whatever the name of your script is, simply put ./ to run it)
If successful, the PowerShell prompt should look like the following:
Once successful, restart your computer and you should see both the lock screen and desktop background change.
If you ran the script with the incorrect images, or need to undo the changes for whatever reason, search for and open regedit in the start menu to edit the Windows registry.
Then, navigate to: HKCU:\software\microsoft\windows\currentversion\policies\system
Right click on ‘wallpaper’, select ‘modify’, delete the value data, then click OK. Restart your computer, and you can attempt to run the script again with the same process above after you have made the necessary changes.