Skip to content

Instantly share code, notes, and snippets.

@s7ephen
Created November 24, 2010 17:20
Show Gist options
  • Save s7ephen/714023 to your computer and use it in GitHub Desktop.
Save s7ephen/714023 to your computer and use it in GitHub Desktop.
How to change the desktop wallpaper from powershell.
set-itemproperty -path "HKCU:Control Panel\Desktop" -name WallPaper -value accipiter.png
@Mister-Curious
Copy link

Is there a way to get these awesome scripts to work for an entire DIR, instead of single file?

Cheers

@Arsenius01
Copy link

$setwallpapersrc = @"

...

Thank you very much, perfectly working with powershell, amazing :o

@GiwbyAlbatross
Copy link

It doesn’t seem that this works, just tested on windows 10 (server?) in an azure lab VM I had lying around. Is this broken in newer windows versions or am I doing this wrong? I copy-pasted the command and used a random JPG I found on the internet as the test background. I received no errors when I run it, but it didn’t change anything. If I use get-itemproperty I can see WallPaper is set to fish.jpg but the desktop background isn’t changing…

@GiwbyAlbatross
Copy link

GiwbyAlbatross commented Jun 16, 2025

Oh never mind you just have to restart the system. Is there any way to force the wallpaper/desktop update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment