I decided to put this together because when I was trying to work with WDS (Windows Deployment Services) with my buddy Louie Meraz we found the information online to be somewhat incomplete. It would get us past one issue and on to another one. Some people seemed to do it one way and others did it a different way. We learned that there’s only a few steps you have to do and once you’ve got it down, it is really easy. WDS is a built in role in Server 2008 R2 so if you’ve got a server you should be able to use it for your image deployment. What you will need to get it working for Windows 7 is as follows.
- Create your Image
- Pre-Stage the machine in Active Directory
- ImageUnattend.xml
- HostName.xml (oobeUnattend)
- Inject the drivers
Create your Image
If you are familiar with any other OS deployment mechanisms you have probably used sysprep before. To create your image you need to use a clean Windows 7 machine, add the software you would like. Ensure you clean up all the profiles you don’t want the users to get or any other undesirable “noise”. Ensure your machine is off the domain and run sysprep by running via the command line:
sysprep /oobe /generalize /reboot
Pre-Stage the machine in Active Directory
The first step of the process is to pre-stage the machine you wish to push your Windows 7 image to in Active Directory. By doing this you ensure when going through the PXE boot, WDS will use the OobeUnattend.xml file associated to your machine and it also ensures the correct machine name is given to your machine when the Operating System has been put down. You can do this simply with a command run on your server as follows:
C:\Windows\System32\WDSUTIL /Add-Device /Device: <HostName> /ID: <MacAddress> /WDSClientUnattend:HostName.xml /BootProgram:boot\x64\PXEboot.
<unattend xmlns=”urn:schemas-microsoft-com:unattend”>
<settings pass=”windowsPE”>
<component name=”Microsoft-Windows-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition>
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
</Disk>
</DiskConfiguration>
<WindowsDeploymentServices>
<ImageSelection>
<InstallImage>
<ImageGroup>Win7Desktop</ImageGroup>
<ImageName>Windows7</ImageName>
</InstallImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>Never</WillShowUI>
</ImageSelection>
</WindowsDeploymentServices>
<EnableFirewall>false</EnableFirewall>
<EnableNetwork>true</EnableNetwork>
<Restart>Restart</Restart>
</component>
<component name=”Microsoft-Windows-International-Core-WinPE” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
<WillShowUI>Never</WillShowUI>
</SetupUILanguage>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
</component>
</settings>
<settings pass=”auditSystem”>
<component name=”Microsoft-Windows-Deployment” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<AuditComputerName>
<Name></Name>
<MustReboot>true</MustReboot>
</AuditComputerName>
</component>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<TimeZone>US Mountain Standard Time</TimeZone>
<DisableAutoDaylightTimeSet>true</DisableAutoDaylightTimeSet>
</component>
</settings>
<settings pass=”specialize”>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<DisableAutoDaylightTimeSet>true</DisableAutoDaylightTimeSet>
<TimeZone>Mountain Standard Time</TimeZone>
<ComputerName></ComputerName>
</component>
<component name=”Microsoft-Windows-UnattendedJoin” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<Identification>
<UnsecureJoin>true</UnsecureJoin>
</Identification>
</component>
<component name=”Microsoft-Windows-International-Core” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<settings pass=”oobeSystem”>
<component name=”Microsoft-Windows-International-Core” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<cpi:offlineImage cpi:source=”catalog://Server/wdsvol/operating systems/windows 7/windows 7 w_sp1/windows 7 w_sp1_x64/sw_dvd5_win_pro_7w_sp1_64bit_english_mlf_x17-28603/sources/install_windows 7 professional.clg” xmlns:cpi=”urn:schemas-microsoft-com:cpi” />
</unattend>
<unattend xmlns=”urn:schemas-microsoft-com:unattend”>
<settings pass=”windowsPE”>
<component name=”Microsoft-Windows-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition>
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
</Disk>
</DiskConfiguration>
<WindowsDeploymentServices>
<ImageSelection>
<InstallImage>
<ImageGroup>ProdDesktop</ImageGroup>
<ImageName>W7June2012</ImageName>
</InstallImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>Never</WillShowUI>
</ImageSelection>
</WindowsDeploymentServices>
<EnableFirewall>false</EnableFirewall>
<EnableNetwork>true</EnableNetwork>
<Restart>Restart</Restart>
</component>
<component name=”Microsoft-Windows-International-Core-WinPE” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
<WillShowUI>Never</WillShowUI>
</SetupUILanguage>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
</component>
</settings>
<settings pass=”auditSystem”>
<component name=”Microsoft-Windows-Deployment” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<AuditComputerName>
<Name></Name>
<MustReboot>true</MustReboot>
</AuditComputerName>
</component>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<TimeZone>US Mountain Standard Time</TimeZone>
<DisableAutoDaylightTimeSet>true</DisableAutoDaylightTimeSet>
</component>
</settings>
<settings pass=”specialize”>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<DisableAutoDaylightTimeSet>true</DisableAutoDaylightTimeSet>
<TimeZone>Mountain Standard Time</TimeZone>
<ComputerName></ComputerName>
</component>
<component name=”Microsoft-Windows-UnattendedJoin” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<Identification>
<UnsecureJoin>true</UnsecureJoin>
</Identification>
</component>
<component name=”Microsoft-Windows-International-Core” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<settings pass=”oobeSystem”>
<component name=”Microsoft-Windows-International-Core” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”https://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”https://www.w3.org/2001/XMLSchema-instance”>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<cpi:offlineImage cpi:source=”catalog://Server/wdsvol/operating systems/windows 7/windows 7 w_sp1/windows 7 w_sp1_x64/sw_dvd5_win_pro_7w_sp1_64bit_english_mlf_x17-28603/sources/install_windows 7 professional.clg” xmlns:cpi=”urn:schemas-microsoft-com:cpi” />
</unattend>