# Synaxar daily wallpaper $ErrorActionPreference = 'Stop' $dir = Join-Path $env:USERPROFILE 'Pictures\Synaxar' New-Item -ItemType Directory -Force -Path $dir | Out-Null $stamp = Get-Date -Format 'yyyy-MM-dd' $file = Join-Path $dir ("synaxar-" + $stamp + ".png") $url = 'https://synaxar.com/wallpaper/today-desktop.png?locale=it&theme=dark' Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing Add-Type -TypeDefinition @" using System.Runtime.InteropServices; public static class SynaxarWallpaper { [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern bool SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni); } "@ [void][SynaxarWallpaper]::SystemParametersInfo(20, 0, $file, 3)