How to change lockscreen picture by command line?


  1. Posts : 23
    Always latest Windows 10
       #1

    How to change lockscreen picture by command line?


    Hi All

    is there any way to change lockscreen picture via command line or powershell scripts?

    Thanks for any replies.
      My Computer

  2. RickC's Avatar
    Posts : 872
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #2

    Store your new lockscreen image. The default location is C:\Windows\Web\Screen.

    Change the lockscreen image like this:

    PowerShell
    Code:
    $path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" 
    $img =  "C:\Windows\Web\Screen\MyLockscreen.jpg"
    
    Set-ItemProperty -Path $path -Name LockScreenImage -value $img

    Note that you need to sign out/sign in to see the change.

    Hope this helps...
      My Computer


  3. Posts : 23
    Always latest Windows 10
    Thread Starter
       #3

    RickC said:
    Store your new lockscreen image. The default location is C:\Windows\Web\Screen.

    Change the lockscreen image like this:

    PowerShell
    Code:
    $path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" 
    $img =  "C:\Windows\Web\Screen\MyLockscreen.jpg"
    
    Set-ItemProperty -Path $path -Name LockScreenImage -value $img

    Note that you need to sign out/sign in to see the change.

    Hope this helps...
    Thanks for you reply. However this trick does not work when you replace the image in the same location. Windows 10 1909 simply does not update lock screen picture in this case.

    Any other clues guys?

    Is there anything that actually triggers lock screen picture change in the system?
      My Computer

  4. Berton's Avatar
    Posts : 11,982
    Win10 Pro Versions 2004 and 2009/20H2, Win10 Pro IP_Dev, Win10 Home 1909
       #4

    What I'm getting on the Lockscreen is an image that shows when booting before logging in, the one that gives a choice of like or not like, changes every time.
      My Computers


  5. Posts : 23
    Always latest Windows 10
    Thread Starter
       #5

    Berton said:
    What I'm getting on the Lockscreen is an image that shows when booting before logging in, the one that gives a choice of like or not like, changes every time.
    You mean you have set Windows Spotlight?
      My Computer

  6. Berton's Avatar
    Posts : 11,982
    Win10 Pro Versions 2004 and 2009/20H2, Win10 Pro IP_Dev, Win10 Home 1909
       #6

    4k3or3et said:
    You mean you have set Windows Spotlight?
    Because I help older clients I keep my computers as uncustomized as possible so No, I didn't change the default setup of Windows [WYSIWYG] or any settings later except for adding a right-click context menu item of Copy to and Move to [Tutorial on this site], quite handy working with drives and files.
      My Computers



 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 19:32.
Find Us




Windows 10 Forums