MDT: Unattend.xml CopyProfile


CopyProfile is a setting added to the Microsoft-Windows-Shell-Setup section of an Unattend.xml.

<CopyProfile>true</CopyProfile>

Adding this entry to a Deployment of a Custom Image that has an Administrator Profile will cause Windows Setup to replace the Default User Profile with the Administrator Profile.


What is Copy Profile?

Microsoft Hardware Dev Center: CopyProfile

CopyProfile enables you to customize a user profile and use the customized profile as the default user profile. Windows uses the default user profile as a template to assign a profile to each new user.
CopyProfile runs during the specialize configuration pass and should be used after you make customizations to the built-in administrator profile. Using the CopyProfile setting often requires a separate answer file to use when run you generalize a computer by running sysprep.
Be aware of the following considerations before using CopyProfile:

  • On the reference computer, only use the built-in administrator account. Creating multiple accounts might result in copying the wrong user profile as the default profile.
  • Do not use a domain account. The CopyProfile setting runs after the computer is removed from the domain during sysprep and settings configured in a domain account will be lost. If you make changes to the default user profile, and then join the computer to a domain, the customizations you made to the default user profile will appear on new domain accounts.
  • Some customizations to the default user profile are not copied, such as items pinned to the task bar. Some settings are reset by the new user logon process. To configure those settings, use Group Policy settings or create scripts to define these user settings.

How Does Copy Profile Work

  • In an MDT Build and Capture Task Sequence, customize the Administrator Profile with your customizations and settings and then Capture the Image.  (SCCM doesn’t create an Administrator Profile, so you must use MDT)
  • Configure the Custom Image for deployment
  • In the Unattend.xml, add the CopyProfile entry for component Microsoft-Windows-Shell-Setup in the Specialize pass.  You can use Windows SIM to do this step.
<CopyProfile>true</CopyProfile>
  • When deploying your Custom Image, the Administrator Profile will be copied to the Default User.  You can validate this by looking in your C:\Windows\Panther\UnattendGC\setupact.log

2015-11-02_23-51-09

  • You can even validate this in C:\Windows\System32\Sysprep\Panther\IE\setupact.log

2015-11-02_23-52-48

  • Once deployment is complete, everything should “look” ok

The Issues

The problem with using CopyProfile is that there is no documentation on what exactly is copied. According to the logs, it appears that everything, or most everything is copied over.  Be aware that you should keep the Administrator Profile is as clean as possible in your Reference Image . . .

I’ll detail some issues in my next post with CopyProfile and OneDrive


Advertisements