Sysprep and Capture a Windows Image with MDT 2012

Since MDT 2012 is out for a while now, I taught I’ll create a post on how to capture a clean and configured OS (reference computer), so this can be deployed later to multiple machines on your network. I will show you how to capture a Windows 7 and an XP system, especially XP because some problems occur on this one sometimes. O yeahh…if you are using MDT 2010 no worries, you can follow along.

Let’s start with Windows 7 first because it’s easier. I will capture a Windows 7 Enterprise x64 since this is used in companies and small business, but you can use whatever edition you want; and I hope you are not using the Starter edition ’cause that’s for children. Before we can actually capture the OS we need to create a Task Sequence in MDT. Go to the Task Sequence object, right-click it and choose New Task Sequence.

Type and ID, a name and description for this task sequence and click Next.

Because we want to capture a system, on the Select Template page select Sysprep and Capture from the drop-down-box.

Choose an operating system from the list and continue. You should select the type of OS that matches the one you want to capture. Don’t select an XP image here if you want to capture a Windows 7 system. If no images show up in the list you need to add them, by following this article.

I will choose here the default option not to specify a product key at this time, because I am capturing Windows 7 Enterprise. Once I deploy this OS to all the systems in the network I will use KMS for activation. If you are capturing a Windows 7 Ultimate, a Retail or OEM product key needs to be presented, or you need to do some manual work after the deployment.

This is a simple one; just fill in the boxes with the name and organization and click Next.

I recommend you specify and administrator password. This is the password for the local administrator account, not the domain one.

If your details are in order, click Next on the Summary screen, then Finish, to close the wizard.

     

Now the task sequence should appear in the Deployment Workbench console.

Before we go ahead and capture the system, verify that your MDT rules allow to capture systems. The option SkipCapture needs to be set to NO. Don’t forget to update the deployment share after making this change.

If everything is in order let’s go to our Windows 7 system and capture it. Open the path to your deployment share and go the Scripts folder. Type the credentials of a domain admin account when asked, then from the Scripts folder launch the LiteTouch.vbs script.

The system that you capture should not be joined to a domain, it needs to be in a workgroup environment.

 After the wizard launch, select the capture task sequence that we’ve created earlier, then hit Next.

Here we have multiple choices, but only the first one will prepare the system and create an image of it. Select Capture an Image of this reference computer, and in the Location box type the path where the image will be saved, if the default one is not good for you. On the File Name box I recommend you type a descriptive name for the image.

Here click the Begin button to start the capture process.

The preparation will take a few minutes,

     

then the computer will reboot into WinPE environment and starts capturing the system.

The capture process take quite a while, but after is finished the image should be uploaded in the specified path that you typed during the wizard. If you followed along the image should be on your deployment share folder > Captures. Looks like I had a warning here, but nothing bad. Now you can start deploying this image to the rest of your workstations.

     

Let’s see how the capture works for Windows XP. First a task sequence needs to be created, but this time choose a Windows XP image on the Select OS page during the wizard.

XP doesn’t have an embed product key like Vista, 7 and Windows 8 does, so you will need to provide it now, or you will have some problems later when you deploy this image.

Open again the path to the deployment share, go in the Scripts folder and execute the LiteTouch.vbs script. Follow the wizard like before.

This is what I wanted to show you. The wizard pops-up with an error which tells you that an older version of sysprep is present in the deployment share, even tough is not correct. In my case I am using the same version of Windows XP, in MDT and the one I want to capture.

Error: “….”. Using older versions of Sysprep is not supported. Ensure that you have the appropriate version.

In this case you need to go the Microsoft web site and download the latest deployment tools. On the deployment share go in the Operating Systems folder. Here you will have the Windows XP system that you imported from the CD and used during the Sysprep and Capture task sequence wizard. Open the folder and browse to Support > Tools. Paste the deploy.cab that you just downloaded from Microsoft and replace the one that exists here.

Now reopen the capture wizard by executing the LiteTouch.vbs script. This time sysprep is working, and the system is captured with success.

     

     

Want content like this delivered right to your

email inbox?


71 thoughts on “Sysprep and Capture a Windows Image with MDT 2012

  • 26/04/2017 at 14:19
    Permalink

    Good morning, I’m following the steps one by one. I create the “Task Sequences”, the same way you doing it.
    Ones I get into the “Capture part” I run the “LiteTouch” scrip, I run the command. After the wizard launch, I don’t get the multiple choice question. The wizard ask me for the computer information, “Select a Task sequence”. So I select “Capture” and next, and I get the computer details, and continue until I get the part for my credentials and then ready. and that’s all.
    I don’t see it the same way you explain here.
    What I’m doing wrong… I can figure out…

    Reply
    • 28/04/2017 at 06:47
      Permalink

      Verify the rules and don’t forget to update the Deployment Share. It should work then.

      Reply
  • 03/06/2015 at 09:31
    Permalink

    Hi,

    I want to deploy a win8 image to a SurfacePro 3.
    I followed this procedure to set things up,
    http://blogs.technet.com/b/askcore/archive/2014/07/15/deploy-windows-to-surface-pro-3-using-microsoft-deployment-toolkit.aspx

    All seems ok, now i boor the surface in PXE and get the following Wizard Error”
    A connection to the deployment (my deployment share) could not be made.

    The following network device did not have a driver installed.
    PCI\VEN_11AB&DEV_2B38&SUBSYS_045E0001&REV_00
    Retry: Try again to connect to the deployment share.
    Cancel: Give up, cancelling any in-progress task sequence.

    I am sure i have all the correct network drivers injected.

    I am using MDT 2012

    Any ideas?

    thanks,

    Ron

    Reply
    • 04/06/2015 at 09:54
      Permalink

      Hi,
      I don’t have experience with SurfacePro but from what I see here is definitely a network driver problem. Download the drivers from the vendor, unpack them and follow this article on how to inject the drivers in the MDT image.
      Also hit Shift+F10 and do an ipconfig. If you don’t see anything, this means the network driver did not load.

      Reply
  • 26/05/2015 at 16:02
    Permalink

    Hi,

    Local Administrator account is disabled after deploying the image.

    Steps Taken:

    1. Deployed the captured image.
    2. Update few changes to it
    3. Activated Windows and Installed Window Updates.
    4. Sysprep and capture the reference machine

    Now when I deploy the captured image , the local administrator account gets disabled. I have set CopyProfile = true but that does not help. How should I reset the SkipRearm value without capturing the reference computer again.

    Reply
    • 03/06/2015 at 16:51
      Permalink

      It may not be good to capture the image with the updates. I notice it makes the image bigger than needed and you can always get updates after it’s connected to the internet.
      As for the admin account, have you checked the unattend.xml file to see if it is active there?
      There is a command line on the unattend.xml file that activates the Admin account, logs in and finishes the imaging and then reboots. After that, the Admin account is active and stays active.
      The command is cmd /c net user Administrator /active:yes.
      This is located in the unattend.xml file under :
      4\Specialize\amd64 (or86)_Microsoft-Windows-Deployment_neutral
      Run Synchronous
      RunSynchronousCcommand[Order=”1″]
      These are run command that are configured to separately and for mine, I have three of them.

      Hope this helps.

      Reply
  • 13/05/2015 at 17:56
    Permalink

    Bobby,

    You might be missing some step out there. I have tried this many times but never worked, i finally used Clonezilla which is awesome. if your goal is to create a gold image and build multiple systems off of that, clonezilla is your best bet.

    Reply
    • 14/05/2015 at 12:50
      Permalink

      It works, but you have to try it until you master the process. don’t think that you just install MDT and it will work from the first time. You need to be patient and do some labs.

      Reply
      • 14/05/2015 at 21:58
        Permalink

        I am testing in a lab environment. maybe there is some thing I am missing. I have deleted the task sequence, update deployment share. recreate a new task sequence, update deployment share. still stops at action: configuring.

        Reply
          • 15/05/2015 at 20:54
            Permalink

            there is no error. the installation screen disappear off the screen and not thing else happens. I have check the panther folder but cant seem to locate any error.

    • 14/05/2015 at 21:55
      Permalink

      I was looking at this and its a whole new set of learning curve. MDT work fine, just not from the point of a capture from a reference computer.

      Reply
  • 12/05/2015 at 14:59
    Permalink

    I have followed all the steps to capture an image but it never works. create the reference computer and run the litetouch.vbs from the deployment share on the reference computer. i get the wizard running and select the capture task sequence, then it runs and after a brief moment it start the installation progress and show running action : set image build then the last thing it show is running action : configure then that disappear off the screen and nothing else happens. left this over night and still no capture. what am i missing. please your help is needed. i have search and cannot find any reference to this. Event viewer doe snot show me any errors on the reference computer or from the deployment server

    Reply
    • 13/05/2015 at 15:27
      Permalink

      Hmm, never happened to me. Try by pressing Shift+F10 when this happens and go read the error/deployment logs. You can find them in the \windows\phantom folder. Also try this by deploying the image on a VM first, see if it works.

      Reply
      • 14/05/2015 at 14:53
        Permalink

        Shift+F10 give me the mouse right click menu. I am not deploying I am trying to capture from the client PC after I browse to the deployment share. where is the phantom directory. or did you mean panther directory

        Reply

Leave a Reply to brian Cancel reply

Your email address will not be published. Required fields are marked *

*

css.php