Partager via


How can you capture a Windows XP image using System Center 2012 Configuration Manager OSD?

Have you received this question? Let’s do some meditation on the Dojo about this.

Here is the answer. Like a Ninja on the Shadows.

There are multiple solutions to perform this capture. The fastest way is to create a Capture Media CD and perform the capture manually.

How to Create Capture Media

I also suggest reading the following documentation before continuing with this blog post.

Planning for Capturing Operating System Images in Configuration Manager

Now that we understand a little bit more from the documentation library, let’s start working in the Automate Capture of the Reference Machine. To accomplish this we will build a task sequence to capture the Windows XP image from the Reference Machine.

The goal of this task sequence will be the following:

· Perform a capture of a domain joined Windows XP image

· Deploy the task sequence using the Configuration Manager Client

· Store the image on the source server for use with future task sequences

Based on the documentation, we can’t have the computer joined to the domain. We will create a task sequence step to remove the computer from the domain. Because the computer is joined to the domain, we also face another challenge. The local security policy “Password must meet complexity requirements” is enabled which will prevent clearing the local Administrator password. We are also going to create a step to override this as part of our capture process. Now let’s start working on the actual steps. A total of six steps have been outlined here.

Step 1 Create a Windows XP Support Tools Package

This will be needed to remove the computer from domain and join the computer to a workgroup without the need of restarting the computer.

Download Windows XP Service Pack 2 Support Tools

Extract the contents of WindowsXP-KB838079-SupportTool by executing the following command line

WindowsXP-KB838079-SupportTools-ENU.exe /c /t:c:\TempXPSupportTools

This will extract four files:

Support.cab

Suptools.msi

Sup_pro.cab

Sup_srv.cab

We need to expand the support.cab into the apps source folder for our package.

Run the following command:

expand support.cab -f:* c:\apps\XPSupportTools

Now let’s create the package in Configuration Manager.

In the console, open Software Library Workspace

Expand Application Management > Packages

Right click Packages and then click Create Package

image

The Create Package and Program Wizard will appear. Fill in the details using the following screenshot as an example.

image

Once you have enter all the details click next

image

Select do not create a program and click next.

image

Click close.

You have now built the XP Support Tools Package that will be part of our task sequence.

Step 2 Create a SecEdit .INF Package

This will be used to ensure the password complexity is not enabled.

We need to create a PassOverride.inf file with the following contents:

[Unicode]

Unicode=yes

[Version]

signature="$CHICAGO$"

Revision=1

[Profile Description]

Description=this is to remove the password complexity requirements and the sysprep can reset the administrator password

[System Access]

MinimumPasswordAge = 30

MaximumPasswordAge = 42

MinimumPasswordLength = 0

PasswordComplexity = 0

PasswordHistorySize = 0

Attached here is a copy of the PassOverride.inf file.

Now let’s create a folder in our apps source named PassOverride and put the PassOverride.inf file in there so we can create a package.

To create the package, open Software Library Workspace in the console and expand Application Management and then Packages.

image

Click on Create Package.

Fill in the package details and point to the PassOverride folder we created for the package source files.

image

Click next.

image

Select do not create a program and click next

image

Now we have created the package for the PassOverride function.

Step 3 Create the Sysprep Package

Since this is a Windows XP capture, we most include the Sysprep files so Configuration Manager can copy them into the c:\sysprep at the moment of capture. Without these files you will not be able to capture the image.

Download Windows XP Service Pack 3 Deployment Tools

Once you download the Deploy.cab you most expand this into the apps source folder. Create a new folder named WinXPSp3Deploy and execute the following command line:

expand deploy.cab -f:* c:\apps\WinXPSP3Deploy

Open Software Library Workspace and expand Application Management.

Right click on Packages.

image

Click Create Package.

Fill in the details for the Sysprep package, including the correct source path.

image

 

Click next.

image

Select do not create program and click next twice.

image

Click close.

You have now completed the Sysprep package.

Now we are going to begin the process of creating our task sequence.

Step 4 Create Task Sequence

The task sequence that we are going to create will be used to capture the Windows XP image.

Open Software Library Workspace and expand Operating System Deployment.

Right click on Task Sequence and click Create Task Sequence.

image

Wait for the Create Task Sequence Wizard to launch.

Select Create a custom task sequence.

image

Click Next

image

Fill in the details and select the x86 boot image and click Next.

image

Click Next and Close

image

Now select the newly created task sequence, right click and click Edit.

image

The Task Sequence Editor will display Click Add > New Group.

image

Fill in the details for this new group as shown above and click the Options tab.

image

On the Options tab select Add Condition for Operating System and choose All Windows XP 32 bit.

Click Add > General > Run Command Line.

image

Change the name to Join Workgroup/Remove from Domain.

image

Enter the following command line:

c:\_SMSTASKSEQUENCE\Packages\PACKAGEID\netdom.exe remove /d:%userdomain% %computername%

NOTE: Replace PACKAGEID with the one for the package you created.

Click on Run this step as the following account and enter the admin credentials that you will use to perform this task. The admin rights are required to remove the machine from the domain.

Q. Why do I want to use Netdom and not the default step to join computer to domain?

A. The join computer to domain step will trigger a restart to make the change effective and we don’t want this to happen at this point of the task sequence. Netdom provides the ability to join the computer to the workgroup without requiring a restart.

Click Add > General > Run Command Line.

Change the name to Running PassOverride – SecEdit

image

Enter the following command line:

c:\windows\system32\secedit.exe /configure /db secedit.sdb /cfg “c:\_SMSTaskSequence\Packages\PackageID\PassOverride.Inf” /quiet

Click on Run this step as the following account and enter the admin credentials that you will use to perform this task. The admin rights are required to override the current GPO.

Q: Why do I need to run this secedit command to capture the Windows image?

A: Based on the TechNet article we reviewed at the beginning of this post, the policy Password must meet complexity requirements is enabled and will prevent sysprep from clearing the local administrator password. This step will remove the policy and allow sysprep to complete successfully. If this step is not performed you most manually change the policy to disabled.

The error related to this policy found in the SMSTS.log

Failed to reset the administrative password, NetAPI Error = 2245”

Important

The Prepare Windows for Capture task sequence step attempts to reset the local administrator password on the reference computer to blank before running Sysprep. If the local security policy Password must meet complexity requirements is enabled, then this task sequence step fails to reset the administrator password. In this scenario, disable this policy before running the task sequence.

Because we use the /quiet switch, there will not be a return code from this command line. Therefore, you must click continue on error on the options tab.

image

Click Add > Images > Install Deployment Tools

image

Append - Sysprep to the current name.

Browse and select the Sysprep package we created.

image

Q: Why I need Sysprep for Windows XP?

A: Sysprep is required so the machine can be generalized and avoid duplicate SIDs on cloned systems. When the image gets deployed we will avoid any future problems. This is not required for Windows 7 as it’s included by default. This will also copy the contents of the package to C:\sysprep

Now that we add the final three steps to complete the Windows XP capture task sequence.

Click Add > Images > Prepare ConfigMgr Client for Capture

Click Add > Images > Prepare Windows for Capture

Click Add > Images > Capture Operating System Image

Now on the Capture Operating System Image enter the destination: Path to your server share.

Account: you must enter the account that will have permissions to save the .wim to your server.

image

The task sequence has been completed; make sure you hit apply to save your task sequence.

Make sure to stage the content to the distribution points before performing the deployment of the task sequence.

Right click on task sequence and click Distribute Content. Follow the instructions on the wizard and complete the Staging process.

Step 5 Deploy Task Sequence to Capture OS Collection

On the Task Sequence right click on Capture Windows XP Image and click Deploy.

image

The Deploy Software Wizard will pop-up and you must select the targeted Collection. In this example, I am pointing to the collection named Capture OS. Click Next

image

This task sequence is set to available so the ConfigMgr Admin must manually initiate the process. Click Next.

image

Click on Show Task Sequence progress and click Next

image

Click Next.

image

Leave the Default Settings and Click Next.

image

Click Next and on the next screen once completed click Close.

image

Step 6 Capture the image on the Windows XP Machine

Now that you have deployed the task sequence to capture the image, go to the workstation you want to capture and open Software Center. You should see the deployment. Click Install.

image

Once you have clicked install you will need to confirm this process. Click Install Operating System.

image

Wait for the Task Sequence to download.

image

Now the Task Sequence will launch.

image

The Join Workgroup Step will execute now.

image

The PassOverride with the secedit commands will execute.

image

Prepare the ConfigMgr Client for Capture Step will run.

image

The Prepare windows for Capture will run and download the boot image to boot the machine into Windows PE.

image

Sysprep is preparing the machine for the capture.

image

The Machine is ready to capture and will restart now.

image

Note: If you don’t want to wait the time for restart you can click on Restart Now.

Windows PE is starting and the capture process will continue.

image

The Capture Operating System Image process has started.

image

Scanning volume 1 of 1.

image

Capturing image from volume 1 and storing the image on the server.

image

This process can take some time. Please be patient while this process completes.

If any failures occur during this process please check SMSTS.log for details about any failure.

PassOverride PassOverride Txt To Inf

Hope this post helps you if so please Rate it 5 star. If you have any questions feel free to comment here or send me a message. Also I want to Thanks David Le Noir Premier Field Engineer for his review of this post.

Santos Martinez - Premier Field Engineer - SMS/ConfigMgr/SQL

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of any included script samples are subject to the terms specified in the Terms of Use

Comments

  • Anonymous
    July 17, 2013
    Great post! I have a question. How transmit to sysprep paramert -mini, and connect sysprep.inf?