meme-of-the-day-wallpaper/meme-of-the-day-client.ps1

10 lines
439 B
PowerShell

Function Set-WallPaper($Value){
$url = "https://memeoftheday.ping-mee.de/wallpaper.png";
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, "C:\temp\wallpaper.png")
Invoke-WebRequest $url -OutFile C:\temp\wallpaper.png
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value $value
rundll32.exe user32.dll, UpdatePerUserSystemParameters
}
Set-WallPaper -value "C:\temp\wallpaper.png"