Thursday, April 05, 2012

Sysprep and Capture a windows image using MDT and WDS



Once your reference computer image has been created, tested and re-tested, from another computer remote desktop into your Windows Deployment Server
Go to the deployment share and then into the control folder. Here you will find two files that you will need to edit.

The first file is ‘bootstrap.ini’. The text that is in it should look like this
[Settings]
Priority=Default

[Default]
DeployRoot=\\WDSSERVER\DeploymentShare$

Where WDSSERVER\DeploymentShare$ is the name of your deployment server shared area

If it does not, copy and paste this into the file deleting anything else in there.

The second file is called ‘customsettings.ini’. The text should look like this
[Settings]
Priority=Default
Properties=MyCustomProperty

[Default]
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=NO
SkipAdminPassword=YES
SkipProductKey=YES

If it does not, copy and paste this into the file deleting anything else in there.

Remember to save both these files when closing.


 Launch the Microsoft deployment toolkit (MDT) workbench and click on the task sequence section


In the above image you can see that the task sequence for ‘sysprep and capture ‘  has already been created. If you do not have it I will quickly run through creating it. If it is already there you can skip the next section.

SKIP THIS SECTION IF SYSPREP AND CAPTURE TASK SEQUENCE ALREADY EXISTS
Right click on task sequence in the left hand pane and choose ‘New Task Sequence’
Give the new sequence an ID and then a name
On the new menu from the drop down box choose ‘sysprep and capture’ and click next.
When choosing an OS to install with it choose the full windows 7 professional base files you should have in the list. It should be called something like “Windows 7 PROFESSIONAL  in Windows 7 x86 install.wim”
Continue to fill in the questions, adding all available information you can. Then click finish. Don’t forget to update the deployment share by right clicking on ‘MDT deployment share’ and choosing update deployment share.



CONTINUE ON FROM HERE
Unlike previously you do not need to PXE boot to capture the image.
Go to reference computer (you will need to have connected it to the domain, but then log off and log on as the local administrator) and map a drive to \\WDSSERVER\DeploymentShare$\Scripts
It doesn’t matter what letter you use but you will have to use your account with domain level permissions
Next open a command prompt and go to that drive letter.
Once in the folder type in this command.
Cscript  litetouch.wsf
The MDT Wizard Screens will launch and prompt for the information required to complete this task sequence.  **Note – we will still process customsettings.ini for this task sequence.  If you have modified customsettings.ini to skip wizard screens, those settings will be honored with this task sequence as well

On the first page choose the Sysprep and Capture task sequence


 On the second page choose the capture option and specify the location to save it and the file name

On the third page put in your domain admin username and password with the domain name
Finally on the fourth page click begin and the deployment wizard should start. The computer will automatically go through the whole process without your input




Once the capture has completed, you can now import the captured image as a custom image file in MDT and use it for future task sequences. With MDT still open on the WDS server right click on “Operating systems” in the left hand pane and choose ‘Import Operating System’
Add new operating system and choose custom image file.
Point to the “Captures” path and move it to the to the deployment share.

Include the setup files for the OS which you are importing and complete the wizards. These again are the base windows 7 professional files

And there you have it. Your brand new image ready to roll out.



No comments: