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_INSTALLERpost_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>

11 Comments

  1. Norm says:

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

  2. Mike says:

    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.

  3. manjunath says:

    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

  4. Kate says:

    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

  5. Jasper Yue says:

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

  6. Yasser says:

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

  7. Ed says:

    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%DCA1…………..

    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

  8. Matt says:

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

    Thanks

  9. Dennis says:

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

  10. Swetah says:

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

  11. Dominique says:

    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 nameapplicationsWindows Server 20082008 Std. and Ent. Eds. x86sourcessysprep.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

Leave a comment

*