Showing posts with label ADK. Show all posts
Showing posts with label ADK. Show all posts

Wednesday, 19 March 2014

Sysprep & Capture thick image

Back to ConfigMgr main menu

Back to MDT Menu


In my experience it is best practice to capture your reference images using MDT build and capture task sequence. However, every now and then, you can be in a situation where a customer has provided a pre-built image (often using another deployment solution) and you have to capture this to a WIM file.

For this, you use a Sysprep & Capture task sequence. It's also an easy solution to implement.

Right click Task Sequences and choose to create one.


Enter a suitable ID and name.


Choose "Sysprep & Capture".


Choose the OS to match what you will be capturing.


No need to specify the product key.


Enter your details (you must enter details in each box to be able to continue).


No need to specify administrator password.


Review the summary and click Next.


Process has completed.


See the Scripts folder in the Deployment share. LiteTouch.wsf is available.


Now lets capture the thick image. Open a command prompt "As Administrator" on the reference computer. First, map a drive to the deployment share, so that we can enter credentials.

Then execute the following command:

cscript.exe \\UNC path\DeploymentShare$\Scripts\LiteTouch.wsf


Script runs.


We are presented with a menu of available task sequences. Choose "Systprep & Capture".


Enter local administrator password.


Choose to capture an image of the computer. Enter a location and file name.


Specify your network credentials.


Review the summary and click Begin.


The task sequence starts. Sysprep is executed. The computer then restarts and boots into Windows PE.


The image is being captured.


The task sequence has completed. You can now restart the computer - we do not need it any more.



Image file (.WIM) is now available to be imported into ConfigMgr.


Saturday, 15 March 2014

Step 5. Advanced image customisation

Back to ConfigMgr main menu

Back to MDT Menu

We have the basic solution in place. The last step is to add a task to pause the task sequence between the build and capture phases. This will allow us to apply any changes we need to the image before it is sysprepped and captured.


Add a new task (Run command line) to the Build & Capture task sequence below Apply Local GPO package.


Enter the command line: cscript.exe “%SCRIPTROOT%\LTISuspend.wsf”

(Edit 7th May 2015: It seems that this command is giving some trouble for some people (see comments below). Try using the command without the quotes if it doesn't work for you.).

That's it. Now run the task sequence again.





This time it pauses after the build phase. See the "Resume Task Sequence" icon on the desktop.

Now make your changes. You can reboot as many times as you like.


Install applications.


Make registry changes.


etc


When you are finished click to resume.


Sysprep is executed.


The image is captured.



Captured customised WIM via MDT 2013 Lite Touch Build & Capture.



 

Step 4. Build & Capture reference image

Back to ConfigMgr main menu

Back to MDT Menu


Everything is now in place so let's carry out our Windows 7 build and capture.



Create a VM with a blank disk. Add the boot media ISO to the VM.


Start the VM.


Enter your keyboard layout and choose to "Run the Deployment Wizard". 


Enter your credentials. This account must have permissions to write to the share that you select later in this post.


Select your Build and Capture task sequence.


Accept the defaults.


Accept the defaults. 


Accept the defaults. 


Enter your required settings.


Enter your required local administrator password.


Choose to capture an image and enter a location and file name.Use the FQDN here. Remember that your reference computer will be in a workgroup at all times.

Also note that the account you chose earlier must have write access to this share.


Review the summary and click Begin.


The MDT Lite Touch Build commences.


OS is applied.




See progress (if you are installing Windows 8 you must switch to the desktop to see this).


Windows PE is applied.


The Capture phase commences. Sysprep is executed.


The image is being captured.


Image capture has completed. You can now turn off the VM.


Image (WIM) is now available to import into ConfigMgr for your deployments.

Our image has been created. However it is just a vanilla Windows 7 image with no applications or customisations. How do we add these? We will do this in the final Step. We will add a task to pause the task sequence between the build and capture phases. This will allow us to apply any changes we need.