|
Copy to Clipboard
$key = 'HKCU:\Control Panel\Desktop'
$WallpaperPath = (Get-ItemProperty -Path $key -Name 'Wallpaper').Wallpaper
$DesktopPath = [Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop)
$NewWallPaperPath = "$($DesktopPath)\Wallpaper_$(get-date -Format "yyyy-MM-dd_hh-mm-ss")$([System.IO.Path]::GetExtension($WallpaperPath))"
if ( Test-Path $WallpaperPath ){
Copy-Item $WallpaperPath -Destination $NewWallPaperPath
}
if ( Test-Path $WallpaperPath ){
Write-Host "Your desktop wallpaper has been saved here: $NewWallPaperPath"
}
| |
| Search Keywords: Backup, wallpaper | |