Finally! I found a failsafe way to set a desired image to both the default wallpaper and lockscreen in Windows 10.
Place a Wallpaper.jpg into your MDT “scripts” folder, add Powershell support to your WinPE (you will need to also add .NET support). Then use this command line after applying the image:
powershell.exe -ExecutionPolicy "ByPass" -Command "Get-ChildItem \"%OSDISK%\Windows\img*.jpg\" -Recurse | % { Copy-Item \"%SCRIPTROOT%\Wallpaper.jpg\" $_.FullName -Force -Verbose }"
I basically am replacing ALL of the built-in Out of box wallpapers with my wallpaper. Using LGPO, registry, or replacing files after Windows is loaded just didn’t work for me. This worked 100% of the time.
/BG
Hi! Could you please explain more about what is MDT and what is %OSDISK% or %SCRIPTROOT% ? I would appreciate a clerification.
MDT is the deployment framework produced and maintained by Microsoft. https://docs.microsoft.com/en-us/sccm/mdt/
The variables mentioned are auto-generated during deployments. If you are not using MDT, the %OSDISK% just references the Windows drive letter and %SCRIPTROOT% is where I stored my image files.
/BG
I do not know if it’s just me or if perhaps everybody else experiencing problems with your website.
It looks like some of the text on your posts are running off
the screen. Can somebody else please comment and let
me know if this is happening to them as well?
This might be a problem with my web browser because I’ve had this happen previously.
Cheers
Thank you for the heads up. I couldn’t see a problem, but here is the code.
powershell.exe -ExecutionPolicy “ByPass” -Command “Get-ChildItem \”%OSDISK%\Windows\img*.jpg\” -Recurse | % { Copy-Item \”%SCRIPTROOT%\Wallpaper.jpg\” $_.FullName -Force -Verbose }”
/BG
Hi, still running actually?
with mdt 8456 and client 1909 win ?
Thx