Technology Solutions for Everyday Folks
Windows logo

Visual Customizations for Windows 10 in OSD

As we work through the tail-end of our Windows 7 fleet (January 14, 2020 is coming if you haven't heard...), I've found myself rolling a different type of hammer process for the last of the "upgrades." This past week as I was tweaking what amounts to an in-place update (by way of wipe and load) for Windows 7 to Windows 10, I was reminded of how Past Me was indeed awesome (and inspired) since this simple script with all the various background and image sizes still works in Windows 10 19XX deployments.

For a few years now, thanks to inspiration from MMS (Jörgen, Gary, and Mark) and others in the community and because Pretty Matters, I've been using a variation of Trevor Jones's script to set the default wallpaper during OSD. My modification includes a baked-in bit to also handle the various default user profile icons and also sets a couple of registry keys to "enforce" the lock screen default with a slightly larger hammer.

My customizations are shared in a GitHub repo for easy access, but the simple script is included below as well:

$ImagePath = 'Backgrounds'
$IconPath = 'UserIcons'
# Remove old wallpaper
Remove-Item $env:windir\Web\Wallpaper\Windows\img0.jpg -Force -Confirm:$false

# Copy new default wallpaper
Copy-Item $PSScriptRoot\$ImagePath\img0.jpg $env:windir\Web\Wallpaper\Windows -Force
Copy-Item $PSScriptRoot\$ImagePath\customlogon.jpg $env:windir\Web\Wallpaper\Windows -Force

# Define image file list
$Images = @(

# Copy each 4K image
Foreach ($Image in $Images)
    Copy-Item "$PSScriptRoot\$ImagePath\$Image" $env:windir\Web\4K\Wallpaper\Windows -Force

# Set Machine Default for the lock screen (this is also accomplished by way of GPO, but we do it here too)
$path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" 
$img =  "$env:windir\Web\Wallpaper\Windows\customlogon.jpg"

# Apply Registry Keys
If (!(Test-Path $path))
    New-Item -Path $path -Force
    New-ItemProperty -Path $path -Name LockScreenImage -Value $img
} else {
    Set-ItemProperty -Path $path -Name LockScreenImage -Value $img

# Define image file list
$UserImages = @(

# Copy each User Icon
Foreach ($Image in $UserImages)
    Copy-Item "$PSScriptRoot\$IconPath\$Image" "$env:ProgramData\Microsoft\User Account Pictures" -Force

Future Opportunities

In our environment, I have separate packages for each of the background/icon variations for the organization. I'd like to bolt in some additional logic (likely by way of task sequence variables) to further reduce the number of task sequence steps (at the slight expense of a larger single package) and maintenance complexity. The script wouldn't change much (in theory) other than setting the root path for the source images.

Headline image via wired