banner



How To Rename A Default User Directory After Changing Computer Name

Note: For a Windows 10 Version, see this blog instead: https://smsagent.wordpress.com/2017/07/06/setting-the-default-wallpaper-for-windows-10-during-configmgr-osd/

Recently I was given an interesting job – set the default wallpaper on new estimator builds with ConfigMgr OSD, just don't lock it such that users can't change information technology.  It turns out it is elementary enough to do, but information technology requires changing the default wallpaper that comes with windows, which tin be establish at C:\Windows\Web\Wallpaper\Windows\img0.jpg.  If you check the security on that file however, you'll find that only the "TrustedInstaller" has full permissions to it, so to modify it in the online OS requires messing with permissions.  Instead, you can change offline during the WinPE phase of the deployment, which bypasses the permissions problem.

This process requires MDT-integrated ConfigMgr 2012, and likewise requires Windows PowerShell to exist added to your boot image.  I've tested on Windows 7 just should besides work with Windows 8.one as it uses the aforementioned location for the default wallpaper.

Create a Wallpaper

First, create your new default wallpaper.  The recommended resolution is 1920×1200, which is the same as the built-in default wallpaper.  Salvage it as "img0.jpg"

Create a PowerShell Script

Use the following code in a new PowerShell Script, and salvage information technology every bit "Set up-DefaultWallpaper.ps1"

The script volition load some task sequence variables, rename the existing default wallpaper to "img1.jpg", and copy the new "img0.jpg" into the same directory.

              # Go the TS variables $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $ScriptRoot = $tsenv.Value('ScriptRoot') $OSDTargetSystemRoot =  $tsenv.Value('OSDTargetSystemRoot')  # Rename default wallpaper Rename-Particular $OSDTargetSystemRoot\Web\Wallpaper\Windows\img0.jpg img1.jpg -Force  # Copy new default wallpaper Copy-Item $ScriptRoot\img0.jpg $OSDTargetSystemRoot\Spider web\Wallpaper\Windows -Forcefulness          

Re-create the files to your MDT Parcel directory

Copy the new wallpaper and the PowerShell script to the Scripts directory of your MDT package source files, and update the MDT Packet to your distribution points.

Capture1

Capture2

Add together a Chore Sequence Step

Now edit your OSD chore sequence and afterwards the "Apply Operating System Image" Step and before the "Apply Windows Settings" step, add together a "Run PowerShell Script" step from the MDT menu.

Capture3

Capture4

Add the path to the script file in the step, eg %SCRIPTROOT%\Set-DefaultWallpaper.ps1

Capture5
That'southward it!  After OSD, your computer will have two files in the location C:\Windows\Web\Wallpaper\Windows, the new default wallpaper, and the old one renamed to "img1.jpg".  Anyone who logs into the estimator will get the new default wallpaper, and they are free to change information technology if they wish.

If you want to too modify the colour scheme in Windows 8.i, there's a nice mail on the Coretech blog.

Source: https://smsagent.blog/2015/06/16/setting-the-default-windows-wallpaper-during-os-deployment/

Posted by: meachamhiscon.blogspot.com

0 Response to "How To Rename A Default User Directory After Changing Computer Name"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel