Created
July 6, 2017 10:51
-
-
Save SMSAgentSoftware/a03f9129911059e26ae7a0fbeec8150a to your computer and use it in GitHub Desktop.
Used to set the default wallpaper images for Windows 10 during MDT-integrated ConfigMgr OS deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the TS variables | |
$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment | |
$ScriptRoot = $tsenv.Value("ScriptRoot") | |
$OSDTargetSystemRoot = $tsenv.Value("OSDTargetSystemRoot") | |
# Rename default wallpaper | |
Rename-Item $OSDTargetSystemRoot\Web\Wallpaper\Windows\img0.jpg img1.jpg -Force | |
# Copy new default wallpaper | |
Copy-Item $ScriptRoot\img0.jpg $OSDTargetSystemRoot\Web\Wallpaper\Windows -Force | |
# Remove old wallpaper | |
Remove-Item $OSDTargetSystemRoot\Web\Wallpaper\Windows\img1.jpg -Force -Confirm:$false | |
# Define image file list | |
$Images = @( | |
'img0_1024x768.jpg' | |
'img0_1200x1920.jpg' | |
'img0_1366x768.jpg' | |
'img0_1600x2560.jpg' | |
'img0_2160x3840.jpg' | |
'img0_2560x1600.jpg' | |
'img0_3840x2160.jpg' | |
'img0_768x1024.jpg' | |
'img0_768x1366.jpg' | |
) | |
# Copy each 4K image | |
Foreach ($Image in $Images) | |
{ | |
Copy-Item "$ScriptRoot\$Image" $OSDTargetSystemRoot\Web\4K\Wallpaper\Windows -Force | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment