Setting the Wallpaper and Lockscreen in Windows 10

By | December 4, 2016
Share

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.

wallpaper-replace-in-task-sequence

pe-features

set-wallpaper

/BG

5 thoughts on “Setting the Wallpaper and Lockscreen in Windows 10

  1. Tolga

    Hi! Could you please explain more about what is MDT and what is %OSDISK% or %SCRIPTROOT% ? I would appreciate a clerification.

    Reply
  2. sur ce site

    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

    Reply
    1. Brian Gonzalez Post author

      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

      Reply

Leave a Reply

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.