If you are testing Windows Server 2008 in a virtual environment you probably get tired of answering setup prompts after each new template gets deployed. Although you can use sysprep as with Windows Server 2003, the answer file for sysprep has changed quite a bit.

The answer file is now an XML file instead of an INF file. In the past, you could generate the answer file with setupmgr.exe but that cannot be done with Windows Server 2008. Instead, you will need to use Windows System Image Manager to create the XML file. Windows System Image Manager is part of WAIK and can be downloaded here. Although much more powerful, Windows System Image Manager is not as easy to use as setupmgr.exe.

The XML file I generated with Windows System Image Manager is very basic but enough to do the job of automating sysprep. Here it is for x86 and nl-be regional settings:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" 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>
            <ProductKey>AAAAA-BBBBB-CCCCC-DDDDD-EEEEE</ProductKey>
            <RegisteredOrganization>Org</RegisteredOrganization>
            <RegisteredOwner>Org</RegisteredOwner>
            <ShowWindowsLive>false</ShowWindowsLive>
        </component>
        <component name="Microsoft-Windows-Security-Licensing-SLC-UX" processorArchitecture="x86" 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>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" 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>nl-be</InputLocale>
            <SystemLocale>nl-be</SystemLocale>
            <UILanguage>en-us</UILanguage>
            <UserLocale>nl-be</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="
http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
                <SkipUserOOBE>true</SkipUserOOBE>
            </OOBE>
            <RegisteredOrganization>Org</RegisteredOrganization>
            <RegisteredOwner>Org</RegisteredOwner>
        </component>
    </settings>
</unattend>

To actually use this XML file, you copy it to your template. I copied mine as sysprep.xml to c:\windows\system32\sysprep. That is the folder on a Windows Server 2008 system where sysprep.exe is located by default. From that location, you execute the following command:

sysprep /generalize /oobe /shutdown /unattend:sysprep.xml

The system will shut down. The next time you start this system (or better a copy of it), it will ask you nothing and install with the settings in the XML file. The computername will be automatically generated.

Update: if you want to use this unattend file on an x64 system, replace x86 with amd64.