Jump to content


  • 0
THEFORCE

automating WDS using unattended.xml

Question

Automating WDS Deployment using unattended.xml

 

Hi, I'm hoping someone can help here. I have a couple of issues with automating WDS using unattended.xml.

 

Firstly, My server is Windows 2008 R2 64bit, I am trying to automate the WinPE phase of WDS. I have associated the the following unattended.xml file to the x86 boot images. However the language is not selected and the username and password is not entered (I have to perform both these tasks manually). The only thing the xml seems to do is choose the partition for where the installation will occour. Here is the xml for the winPe phase

 

< ?xml version="1.0" ?>

<unattend xmlns="urn:schemas-microsoft-com:unattend">

<settings pass="windowsPE">

<component name="Microsoft-Windows-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">

<WindowsDeploymentServices>

<Login>

<WillShowUI>OnError</WillShowUI>

<Credentials>

<Username>wdsadmin</Username>

<Domain>myschool</Domain>

<Password>wdspassword</Password>

</Credentials>

</Login>

<ImageSelection>

<WillShowUI>OnError</WillShowUI>

<InstallImage>

<ImageName>Windows 7 Professional SP1</ImageName>

<ImageGroup>x86 Images</ImageGroup>

<Filename>Windows7proSP1.wim</Filename>

</InstallImage>

<InstallTo>

<DiskID>0</DiskID>

<PartitionID>1</PartitionID>

</InstallTo>

</ImageSelection>

</WindowsDeploymentServices>

<DiskConfiguration>

<WillShowUI>OnError</WillShowUI>

<Disk>

<CreatePartitions>

<CreatePartition>

<Order>1</Order>

<Type>Primary</Type>

<Extend>true</Extend>

</CreatePartition>

</CreatePartitions>

<ModifyPartitions>

<ModifyPartition>

<Active>true</Active>

<Extend>false</Extend>

<Format>NTFS</Format>

<Label>OS</Label>

<Letter>C</Letter>

<Order>1</Order>

<PartitionID>1</PartitionID>

</ModifyPartition>

</ModifyPartitions>

<DiskID>0</DiskID>

<WillWipeDisk>true</WillWipeDisk>

</Disk>

</DiskConfiguration>

</component>

<component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">

<SetupUILanguage>

<WillShowUI>OnError</WillShowUI>

<UILanguage>en-UK</UILanguage>

</SetupUILanguage>

<UILanguage>en-UK</UILanguage>

</component>

</settings>

</unattend>

 

Does anyone know what the issue might be?

 

Secondly, with regards to syspreping a windows 7 machine, I have created an unattended.xml file, using mysysprep and sysprep.cmd, I sysprep the machine and reboot, upon reboot the syprep process asks me to enter a machine name. Once the machine name is supplied, the computer is then added to the domain using the name I supplied, and everything is fine.

 

However, If I run sysprep and then restart the computer, boot into winpe and take an image of the machine. I then load the image on another machine using wds, the process happens exactly the same, i.e. it asks me for a name for the computer. However, regardless of what name I supply (name that is less then 16 characters), the computer is joined to the domain using the username I supplied during the WinPE process of WDS. i.e. at the WinPE stage if I use the account WDSAdmin, my computers will be joined to the domain as WDSAdmin1, WDSAdmin2 etc.. whereas if i use the account administrator it names the machine administrator1 administrator2 etc..

 

This happens regardless of wheather I try to associate an unattended.xml to the winpe process or not. Here is my xml for the Windows 7 image.

 

< ?xml version="1.0" encoding="utf-8"?>

< unattend xmlns="urn:schemas-microsoft-com:unattend">

<settings pass="oobeSystem">

<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="
xmlns:xsi="

<InputLocale>en-GB</InputLocale>

<SystemLocale>en-GB</SystemLocale>

<UILanguage>en-US</UILanguage>

<UILanguageFallback>en-GB</UILanguageFallback>

<UserLocale>en-GB</UserLocale>

</component>

<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="
xmlns:xsi="

<OOBE>

<HideEULAPage>true</HideEULAPage>

<NetworkLocation>Work</NetworkLocation>

<ProtectYourPC>1</ProtectYourPC>

</OOBE>

<UserAccounts>

<LocalAccounts>

<LocalAccount wcm:action="add">

<Password>

<Value>dwBlAGwAYwBvAG0AZQBQAGEAcwBzAHcAbwByAGQA</Value>

<PlainText>false</PlainText>

</Password>

<Description>Local User</Description>

<DisplayName>Teacher</DisplayName>

<Group>administrators</Group>

<Name>Teacher</Name>

</LocalAccount>

</LocalAccounts>

</UserAccounts>

<TimeZone>GMT Standard Time</TimeZone>

<RegisteredOrganization>myschool</RegisteredOrganization>

<RegisteredOwner>myschool</RegisteredOwner>

<ShowWindowsLive>false</ShowWindowsLive>

</component>

</settings>

<settings pass="specialize">

<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="
xmlns:xsi="

<ProductKey>xxxx-xxxxx-xxxxx-xxxxx-xxxxx</ProductKey>

<ComputerName>%Please input a computer name%</ComputerName>

<RegisteredOrganization>myschool</RegisteredOrganization>

<RegisteredOwner>myschool</RegisteredOwner>

<ShowWindowsLive>false</ShowWindowsLive>

<TimeZone>GMT Standard Time</TimeZone>

</component>

<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="
xmlns:xsi="

<Identification>

<Credentials>

<Domain>myschool.local</Domain>

<Username>WDSADMIN</Username>

<Password>WDSpassword</Password>

</Credentials>

<JoinDomain>myschool.local</JoinDomain>

</Identification>

</component>

</settings>

<cpi
redface.png
fflineImage cpi:source="catalog:c:/windows/system32/sysprep/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />

< /unattend>

Thanks in Advance of anyone that can help

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

So to answer your question, I’m going to provide a two part answer.

 

First off, when creating the unattend.xml files you intend to use with Windows Deployment Server and Windows 7 image deployment it is strongly recommend to use Windows System Image Manager (WSIM), a part of the Windows Automated Installation Kit (WAIK), as it simplifies the creation of the XML files ten-fold. If you are currently using WSIM, that’s wonderful. If not, you may download WAIK here. The nice thing about WSIM is that you can validate your answer files so as to ensure complete accuracy. When I attempted to validate your answer file that you are using with your Windows 7 deployment the computer name field issued an error for the value “%Please input a computer name%”.Properly having your sysrep’d machine prompt you for a computer name is a well discussed topic on TechNet as can be seen here. Mike_EEC of Microsoft proposes a work around solution that involves a VB script. Alternatively, you can pre-stage the computer in AD to make sure the name you want is selected using a variable such as %machinename% as outlined in the sample unattend file here. As a last resort, you could use an asterisk (*), also known as a wildcard, which will automatically assign a randomly generated computer name for you.

 

You also might want to consider using the Microsoft Deployment Toolkit (MDT) to fulfill your Windows PE deployments as it sounds as though you are intending to do a Lite Touch Deployment anyway. MDT offers a common console to handle all of your deployment tasks such as creating partitions, injecting drivers, applications, and more. You can also create task sequences to accomplish all the goals you mentioned in your OP. It is even compatible with Windows XP, Windows Vista, Windows 7, and Windows Server 2003, 2008, and 2008 R2, which means learning one utility to do all of your deployments. A great video to watch to understand using MDT and WDS together is available on TechNet here.

 

Next, to address each of your XML files and help you understand the purpose and best practices for imaging and deployments, it would be good to check out the Deliver and Deploy page of the Springboard Series on TechNet as there are several wonderful resources available to help get you started in the right direction with Windows 7 deployment. Just as reference, sample unattend files can be found here. The first XML file you posted, I’m assuming, is the one you are using with WDS under the ‘client’ tab of your Windows Deployment Server. I’m going to refer to this as WDSUnattend. This unattend file should be as basic and general as possible. For example, mine has SetupUILanguage under the windowsPE pass and that’s it. Yours is fine as it is with the exception of the SetupUILanguage fields not being filled out entirely and the locale ID used being incorrect. For the proper Locale IDs, Input Locales, and Language Collections you might want to refer to this resource. An example of how yours should read is:

 

<component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">

<SetupUILanguage>

<WillShowUI>OnError</WillShowUI>

<UILanguage>en-GB</UILanguage>

</SetupUILanguage>

<UILanguage>en-GB</UILanguage>

<InputLocale>en-GB</InputLocale>

<SystemLocale>en-GB</SystemLocale>

<UILanguageFallback>en-GB</UILanguageFallback>

<UserLocale>en-GB</UserLocale>

</component>

 

Next, in your WDSUnattend, the login credentials provided are only credentials back to your WDS server so that you do not have to enter them in the windowsPE stage. You usually have to enter your administrator credentials to install / deploy an image. Entering the proper credentials here will eliminate that need, if you so desire. This area does not imply that your domain credentials will add to itself to every image you deploy. That is done within the image unattend itself.

 

Speaking of, now let’s take a look at your Windows 7 image unattend.xml in which there was also a problem with an improper locale ID being used under UILanguage. You had English specified in which, I would assume, you wanted en-GB.

 

Finally, if you want the system to automatically log in after deployment, you would want to add the AutoLogon component (in WSIM) to the oobeSystem pass under Microsoft Windows Shell Setup Neutral. An example would be:

 

<AutoLogon>

<Password>

<Value>CHANGEME </Value>

<PlainText>false</PlainText>

</Password>

<Domain>CHANGEME</Domain>

<Enabled>true</Enabled>

<LogonCount>5</LogonCount>

<Username>CHANGEME</Username>

</AutoLogon>

 

I hope all this information helps. I know it’s a lot to absorb but using utilities like WSIM and MDT will truly streamline your imaging and deployment process greatly. A final great magazine article to read is Desktop Image Management: Build a Better Desktop Image by Mitch Tulloch of Microsoft. It really helps the reader see the bigger picture of imaging.

 

Jessica

Windows Outreach Team – IT Pro

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.