3

I want to change the desktop wallpaper on a bunch of users desktop. I dont have AD so I can't use a Global Policy. I found a script that works locally. However, I dont know how to make this run remotely. I plan on running the script from my computer and having it apply on the remote desktop computers I have in a list.

set-itemproperty -path "HKCU:Control Panel\Desktop" -name WallPaper -value c:\wallpaper\wallpaper.jpg

How can I get this this script to run on remote computers?

3
  • Google for "psexec". Once you've found that the rest should be obvious. You might also use appropriate tags. 'powershell' has nothing to do with your question. Mar 2, 2012 at 8:30
  • 1
    it's a powershell command.
    – Jake
    Mar 2, 2012 at 8:55
  • What are the client operating systems?
    – Zoredache
    Mar 2, 2012 at 18:11

1 Answer 1

2
Invoke-Command -ComputerName RemoteComputerName { Set-ItemProperty -Path "HKCU:Control Panel\Desktop" -name WallPaper -value c:\wallpaper\wallpaper.jpg }

However, this answer does assume that the remote machine has WinRM enabled (you don't mention any OS, even though Zoredache asked). Have a look at Get-Help Invoke-Command to see how to do credentials and impersonations if you're running outside of an AD environment.

1
  • The client operating systems are Windows XP and up.
    – Jake
    Mar 6, 2012 at 5:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .