PS to change wallpaper for all users and center the image

This topic contains 1 reply, has 2 voices, and was last updated by  js 6 months, 2 weeks ago.

  • Author
  • #85264

    Dean Bloom

    Hi Guys

    This is quite a basic ask but I'm just learning PS 🙂

    I'm looking for a script to change the wallpaper for all users and center the image (not stretch etc)

    At the moment I have the below but it doesn't center it? will mthe below do this for all profiles too?

    Function Set-WallPaper($Value)
    Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value $value
    rundll32.exe user32.dll, UpdatePerUserSystemParameters
    Set-WallPaper -value "C:\software\logo.bmp"

  • #85270


    .bat not powershell:

    rem change wallpaper
    takeown /f c:\windows\WEB\wallpaper\Windows\img0.jpg
    icacls c:\windows\WEB\wallpaper\Windows\img0.jpg /Grant System:(F)
    icacls c:\windows\WEB\wallpaper\Windows\img0.jpg /Grant Administrators:(F)
    copy /y %~dp0\Wallpaper.jpg c:\windows\WEB\wallpaper\Windows\img0.jpg

You must be logged in to reply to this topic.