The Life of Brian

Active Directory, Group Policies, Server Core and the Life of Brian

Email Notifications

Blog Search Form

Go

Recent Posts

Tags

Disclaimer

  • This blog is provided "AS IS" with no warranties, and confers no rights. This blog contains my own views and does not necessarily reflect the view of my employer.
    Locations of visitors to this page
    Add to Technorati Favorites

Sites I Visit

Archives

Windows Server 2008 Sysprep.xml help

My friend Norm asked if I could post this sample Sysprep.xml file as he couldn't find anything online yet to really help him with Server 2008 and Sysprep.  If you have any questions or feedback just leave it in the comments and I'll be sure to have Norm review them.

Here's a sample sysprep.xml that you can use to get your Server 2008 build going. It has some of the basic functions you'll need if you are deploying Server 2008 in an enterprise environment. This example is for the 64-bit version, using KMS (no product key in the sysprep). We do most of our configuration post-image and this configuration allows us to take a completely generic image and prepare it for enterprise deployment. This .xml is ready to go. It took me several days of trial and error to get this and I'm sure there are some admins that would love to have this as a starting point instead of what I had to start with.

Some of the things I'm doing in here:

  • Auto-generated computer name
  • Organization and Owner Information
  • Setting language and locale
  • Setting the initial tasks screen not to show at logon
  • Setting server manager not to show at logon
  • Configuring the Administrator password
  • Creating a 2nd administrative account and setting the password
  • Running a post-image configuration script under the administrator account at logon
  • Setting automatic updates to not configured (to be configured post-image)
  • Configuring the network location
  • Configuring screen color/resolution settings
  • Setting the time zone
  • Disables IE Enhanced Security Configuration


<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ComputerName>*</ComputerName>
      <RegisteredOrganization>Company Name</RegisteredOrganization>
      <RegisteredOwner>Company Name</RegisteredOwner>
      <ShowWindowsLive>false</ShowWindowsLive>
    </component>
    <component name="Microsoft-Windows-Security-Licensing-SLC-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SkipAutoActivation>true</SkipAutoActivation>
    </component>

    <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <IEHardenAdmin>false</IEHardenAdmin>
      <IEHardenUser>false</IEHardenUser>

    </component>
  </settings>
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <InputLocale>0409:00000409</InputLocale>
      <SystemLocale>en-us</SystemLocale>
      <UILanguage>en-us</UILanguage>
      <UserLocale>en-us</UserLocale>
    </component>

    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <RegisteredOrganization>Company Name</RegisteredOrganization>
      <RegisteredOwner>Company Name</RegisteredOwner>
      <UserAccounts>
        <AdministratorPassword>
          <Value>@bc!23</Value>
          <PlainText>true</PlainText>
        </AdministratorPassword>
        <LocalAccounts>
          <LocalAccount wcm:action="add">
            <Password>
              <Value>@bc!23</Value>
              <PlainText>true</PlainText>
            </Password>
            <Description>Administrative Installer</Description>
            <DisplayName>Admin2</DisplayName>
            <Group>Administrators</Group>
            <Name>Admin2</Name>
          </LocalAccount>
        </LocalAccounts>
      </UserAccounts>
      <AutoLogon>
        <Password>
          <Value>@bc!23</Value>

          <PlainText>true</PlainText>

        </Password>
        <Domain>WORKGROUP</Domain>
        <Enabled>true</Enabled>
        <LogonCount>2</LogonCount>
        <Username>Administrator</Username>
      </AutoLogon>
      <FirstLogonCommands>
        <SynchronousCommand wcm:action="add">

          <CommandLine>%WINDIR%\POST_INSTALLER\post_installer.vbs</CommandLine>
          <Description>Post Install Script</Description>

          <Order>1</Order>
        </SynchronousCommand>
      </FirstLogonCommands>
      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <NetworkLocation>Work</NetworkLocation>
        <ProtectYourPC>3</ProtectYourPC>
      </OOBE>
      <Display>
        <ColorDepth>32</ColorDepth>
        <HorizontalResolution>1024</HorizontalResolution>
        <VerticalResolution>768</VerticalResolution>
      </Display>
      <TimeZone>Eastern Standard Time</TimeZone>
    </component>
  </settings>

  <settings pass="generalize">

    <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
    </component>
    <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
    </component>

  </settings>
</unattend>

Comments

Norm said:

You can replace "amd64" with "x86" and use this same xml file on the 32-bit version.

# March 19, 2008 1:02 PM

Mike said:

Thanks much for the tips, I now know where to disable the appearance of the server manager etc.. but does anyone know why the proxy I had specified in the internet properties along with desktop wallpaper and customizations went after sysprepping Server 2008? It's like the administrator account has been deleted and remade as it was initially out-of-box. Interesting, because as far as I can recall, this does not occur after running sysprep in Vista either with the true administrator(if enabled) or other user accounts.  

# March 28, 2008 11:26 AM

manjunath said:

Hi,

it works well, but after sysprep while system is coming up i got the screen asking for product key to enter, but i need to automate that part as well, offcourse i set skip autoactivation to ture...another thing i m using trail version of windows server 2008. please advise me on this... i dont have any URL my e-mail id manju.kudu@gmail.com

thanks much

Manju

# April 22, 2008 2:15 AM

Unattended Server 2008 Base Image Creation using WSIM/Sysprep | Elan Shudnow's Blog said:

Pingback from  Unattended Server 2008 Base Image Creation using WSIM/Sysprep | Elan Shudnow's Blog

# May 5, 2008 2:06 PM

Kate said:

Hi

When I use WSIM to create a catalog it complains that it has been unable to do so as "The specified location contains a Windows image that is not compatible with the current version of Windows".

I am using the install.wim file that came on the installation disc that I used to install the version of server 2008 that I am working on (Standard), I have copied the .wim file onto my C: drive so it is writable, and I am selecting just to create a catalog for Server 2008 Standard.  Please could you advise where I am going wrong.

Thank you

Kate

# May 28, 2008 10:30 AM

Jasper Yue said:

Copy the catalog files (*.clg) as well. I received the same error without these files.

# June 6, 2008 6:12 PM

Yasser said:

How can i change the file so that it must ask me for credentials from the first time

# June 16, 2008 7:22 AM

Ed said:

Hi, Currently I had created the .XML file.. but it doesn't match my requirement. I had created a file(.txt) which is store all the driver path. After that I copy all the path and go to the RUN ->Regedit->My Computer->HKEY_LOCAL_MACHINE->Software->Microsoft->Windows->CurrentVersion. At the right panel, paste the driver path into the DevicePath.

Example the DevicePath : %SystemRoot%\inf;%systemroot%\D\C\A\1..............

But after all the sysprep run up.. it still show the driver is missing in the Device Manager.

Any 1 can guide me?

Thanks a lot

:)

my email: tkingt84@hotmail.com

# July 28, 2008 8:40 PM

Matt said:

Hi, Does anyone know what are the processorArchitecture= settings for Intel 64 bit?

Thanks

# February 2, 2009 3:14 AM

Dennis said:

Intel 64 bit uses the amd64_ settings. You will see it when you're loading the 64 bit OS image inside WAIK.

# February 27, 2009 1:59 PM

Swetah said:

Hi am unable to join domain using the the xml file.Any sample xml to join the same would help.thanks

# March 10, 2009 2:11 AM

Dominique said:

Hello,

I copied the xnl above to an xml file with Microsoft Visual Studio 2005. I saved the file as sysprep.xml. I open it with Windows System Image Manager and I am getting an error:

Validation error on \\server name\applications\Windows Server 2008\2008 Std. and Ent. Eds. x86\sources\sysprep.xml, line 4, column 3.

Details: the element 'unattend' in namespace 'urn:schemas-microsoft-com:unattend' has invalid child element 'settings' in namespace 'urn:schemas-microsoft-com:unattend'. List of possible elements expected: any element in namespace '##other'.

any idea?

Thanks,

- Dom

error line 4 col;umn 3

# June 1, 2009 1:00 PM