How to Manually Capture an OS Image using ConfigMgr


Written by Kip Ng , Principal Microsoft Premier Field Engineer.


Microsoft System CenterIn System Center Configuration Manager 2007 (ConfigMgr), you can install the Microsoft Deployment Toolkit (MDT) 2010 and it has a task sequence template that you can use to automate the OS deployment, SysPrep it and then Capture the OS as an Image as well.

These are all good, but sometimes you may want to do a little bit more, such as after you deploy the OS you want to install some additional software, etc. You can of course create a package in ConfigMgr for this purpose, but sometimes instead of spending time creating the package and testing it you may just want to get your hands dirty, install the stuff, ensure all the things are good and then just manually capture the image. It is all the matter of preference.

So, here, I just want to take some time to show you how you can manually capture the OS Image just using the SCCM supplied WinPE Boot Image and store that image to a shared directory or in a location of your preference for future usage. So let’s get to it.

Here are a couple of quick steps for you to prepare the environment and to capture the image. It’s assumed that you have properly prepared the target machine.

1. Prepare Boot Image

Firstly, enable the command support for the Windows PE Boot Image if you haven’t.

a. Go to the Operating System Deployment à Boot Images

b. Depending on which architecture you will be using (either x64 or x86), select it and go to the Properties for that itemGo to the Operating System Deployment Boot Images

    

c. Go to the Windows PE tab and then click the Enable Command support (testing only) check box and click OK.

d. Once you have done that, you will be prompted to update the distribution point, just click Yes.

2. Create File Shares

Create a Directory called in the SCCM root folder called, for example, C:\ConfigMgrShare

a. Then Share the folder so that you can access this from the network by using, for example, \ConfigMgrShare">\ConfigMgrShare">\ConfigMgrShare">\ConfigMgrShare">\ConfigMgrShare">\\<computername>\ConfigMgrShare

3. Copy Windows Imaging Utility

Next, you need to have a tool called IMAGEX.EXE, a Windows Imaging Utility. There is a 64-bit as well as 32-bit version of this file. You can find these files in C:\Program Files\Windows AIK\Tools\x86 and C:\Program Files\Windows AIK\Tools\amd64.

a. Create a folder in C:\ConfigMgrShare

b. Copy both directories to C:\ConfigMgrShare\Tools\x86 and C:\ConfigMgrShare\Tools\amd64 respectively.

4. Create a custom Task Sequence

Next, create a simple task sequence by right clicking the Task Sequence in Operating System Deployment and then select New à Task Sequence

New Task Sequence

    

a. Then select Create a new custom Task Sequence and click NextCreate a new custom Task Sequence

b. Then put in a Task Sequence name and select the appropriate Boot image and then click Finish.put in a Task Sequence name and select the appropriate Boot image

   

5. Advertise the Task Sequence

Advertise the task sequence to the appropriate collection (where your target computer will be in).

Advertise the task sequence to the appropriate collection

 

a. Ensure that you check Make this task sequence available to boot media and PXE

b. Then select the appropriate schedule. You may want to mark it as Mandatory

c. Just accept the default settings for the remaining page in that wizard.

6. Capture the Image

a. Boot up the target machine. It should boot up to the SCCM Boot Image. If it is set to mandatory, you don’t need to press anything. If not, you may have to press F12 to select it to boot to the boot image.

 

b. When you see the SCCM background, press F8 to start the command prompt, like the following,

start the command prompt

 

c. Map the drive. I am assuming everything is setup correctly; such as the WinPE can detect the NIC, obtain the IP address with appropriate DNS and etc.

i. Type net use G: \\<computername>\ConfigMgrShares

ii. This will map the share to G drive. You will then be prompted for user name and password, enter the user name and password that allows you to get to the share

enter the user name and password that allows you to get to the share

d. Capture the Image. Navigate to G: and the directory consists of the IMAGEX.EXE then run the following,

 

i. Imagex.exe /Capture C: G:\W2k8Image.wim “Windows2008R2Image” “Windows 2008 R2 Image Description”

Run Imagex.exe

 

ii. This will create and image all the content in C drive to the SCCM server share.

There you go, you just got your image manually captured.

For more information on ImageX Command-Line Options, check out this article on TechNet.