Advertisements
BTNHD News

MDT 2012: Capturing a Reference Image – Part II

I was asked if there was another way to do the sysprep and capture process within MDT 2012. I said to myself, Heck! Yeah! There are several ways to do this, so this blog is a part II of  Episode 12 on my  BJTechNews Channel.
While you could use MDT 2012 to install all the software needed, or even group policy, imagine the time this would take and therefore the amount of time that PC would be sitting there installing software rather than using it :). The simple way around this is to create a reference image of a PC and then capture an image of it to install onto all your other computers [lazy; but it works :)]. With MDT 2012 this is a very simple task and here’s how to do it.
Deployment Share Rules

Right click on the Deployment Share and select Properties

Select the Rules tab and ensure that the Skip Capture rule is set to NO

If you have to change this rule then you need to update the deployment share. Once the update has completed then you will need to replace your current boot images in Windows Deployment Services with the newly regenerate *.wim file.

Capture Task Sequence

The next step is to create a task sequence that will capture an image from your reference computer

Right click on the task sequence node and select New Task Sequence

Complete all the information to identify this task sequence

Select Sysprep and Capture from the drop down menu

Select the operating system that will be used (this will not affect the image being captured)

After accepting the defaults on the next screen complete all the relevant details on the OS settings screen

Enter a password for the local administrator and click Next

At the last screen check the summary and click Next to complete the task sequence

Disable Sysprep Task Sequence

In my experience the execution of the sysprep command from the task sequence is patchy, so to get around this issue you can follow these steps to disable the sysprep command in the task sequence and run it manually before capturing the image of the reference computer.

Right click on the task sequence you have just created and select Properties

Click on the task sequence tab

Click on the Execute Sysprep option and then click on the Option tab on the right hand side.

Now click on the check box next to Disable This Step and click OK to complete the configuration

Capturing The Image

On the reference computer install all your necessary software and then run Sysprep, the sysprep application can be found in the C:\Windows\System32\Sysprep\ folder

Select the options for OOBE (Out Of the Box Experience) and tick the Generalize option

When the PC reboots ensure it boots to the network

As it boots up you will now have another task sequence to choose from as well as your original Windows 7 deployment one, selecting the capture task you have created will start the process of capturing an image of your reference computer and uploading it to your deployment share

In some network scenarios you can get an error message when capturing the image that references a blank UNC error. To solve this error right click on the task sequence and select properties and then select the task sequence tab

You now need to add a variable into the sequence with these settings

  • Name: Set Image Folder
  • Task Sequence Variable: ComputerBackupLocation
  • Value: \\SERVERNAME\deploymentshare$\captures [this could whatever you want it to be, make sure that the share has the correct permissions and enough space]

To add the variable select Add || General || Set Task Sequence Variable and use the details above to complete the fields

Use the arrow buttons to move it to the top of the sequence

I had some time to do a live event on this topic. The video below is a little long, but worth the watch due to it covering all the basics of capturing and sysprep in MDT 2012.

if you enjoyed the blog. please take the time to +1 it , comment or rate it below.

Advertisements
About BjTechNews (845 Articles)
An IT guy trying to learn everything about technology and sharing it with you all. I'm a blogger and video blogger who highlights daily news in the tech industry, promoting tips and hacks for fellow techies.

52 Comments on MDT 2012: Capturing a Reference Image – Part II

  1. Nice write-up, thanks. One question though, when disabling sysprep, your first screen capture shows you selecting ‘Execute sysprep’ under ‘Capture Image,’ and then in your next screen capture you actually disable the one under ‘Sysprep only.’ I understand that was probably a mistake, but just wondering which one to actually disable. Thanks!

  2. Could you explainn how to add the capture image to WDS, i followed the sequence above and the station doesnt reboot it just displays a message after litetouch and says this computer can be used

  3. ZTI ERROR Unhandled error returned by LTIApply…
    Failed to run the action: Apply Windows PE.
    There is not enough space on the disk.

    I have 50 free gigs

  4. That’s what I used to do but we just stripped out the sysprep function in the tut lol. I think I see what you’re saying though, I’ll exec sysprepe manually then try navigating to the deploymentshare in windows and exec the task sequence.
    Everything I see online points to PE incorrectly assigning a drive letter to the system reserved partition so the wim doesn’t know where to go. I guess initially it’s copied to the local computer…

  5. yep that def didn’t work, as soono as I exec sysprep manually in windows I lost my network connection so couldn’t browse to the deployment share.

  6. I used to execute it that way but ran into a different bunch of errors, will try again later

    • let me know. many people are always having issue with the sysprep and capture of MDT. I’ll probably might have to do another fresh video on this and post it up in the channel.

  7. I remember now, when I used to run the script from within windows I received the error shown here:
    http://scexblog.blogspot.com/2010/07/mdt-2010-failure-during-sysprep-and.html

    So I did as mentioned inserting the Clonetag reg setting into the task sequence and it would finally capture without error. Unfortunatly later when I would try and deploy this captured image it would never reach the end of it’s deployment process. It would install the custom image but never complete the task sequence leaving residual files on the system….I’ll add clonetag to this sequence and deploy, maybe somethings different than it was a couple months ago..

  8. I added clonetag and executed the task sequence and it has now rebooted into PE to capture. I don’t know if it was clonetag or not because I realized that this machine was running on a workgroup, but trying to execute deploy.bat off the domain. No big deal because I was editing my domain credentials to access the server but I realized I was inadvertently running deploy.bat as administrator, which would have used the local computers account for execution. No idea if that would cause issues or not. I guess I never thought much about it until now but I assumed that it would be best to capture a machine OFF of the domain so it wasn’t pulling over unecessary domain accounts…my own on every image. Makes me wonder if something like a Capture USB key would be useful to get around this portential issue.

    • very interesting. never heard of “clongtag” before. I would like to see how you set that up. I planning on doing a live stream on this during labor weekend. stay tune for the invite.

  9. Another way i did this was to run drive grabber on the reference computer, then import the drives into MDT and then i could deploy windows 7 directly to the other reference machines, as and when i needed to much quicker than running sysprep, i can deploy windows 7 sp1 direct complete with all drivers and directly onto the domain.

    • Drive grabber? Never heard of it. Need to check that out. I’m planning on doing a live stream on this topic. Getting my vms really for the event.

      Thanks for comment and feedback

      • Yeah nice little tool, run it and it grabs all the drivers on a reference machine then as I mentioned just import and then pie boot when I need to, if i have an xp machine that I need to upgrade to 7 I do the upgrade with a windows 7 DVD or USB whichever i have then make sure imhave all the correct drivers either by windows update or the manufacturers website, the once again I run drive grabber and import and then I can rebuild it anytime I want to, for instance a virus or a replaced hard drive.

        http://www.softpedia.com/get/System/Back-Up-and-Recovery/DriverGrabber.shtml

        Try it and its so much easier than sys prep.

  10. smsts.log

  11. sigh, wouldn’t let me post it. Basically I’m back to square one. Captured fine, applies image, but does not continue task sequence after reboot so I have files still left on the HDD. I don’t think I had this problem until I upgraded to MDT2012 from MDT2010

    • Justin, install windows 7 from a USB or dvd whatever you’ve got, and then run drive grabber, once you’ve grabbed the drivers especially the network, the import into mdt then update and just press f12 and install windows 7 then activate once installed, so much better then messing about sys prepping

  12. I still think the issue has to do with the 100mb partition being assigned a drive letter in PE. This is why I couldn’t capture using the manual sysprep method. When looking at my SMSTS.LOG it shows “D:\_SMSTaskSequence does not exist”, that’s because in Windows it’s C:\SMSTaskSequence… I’ve been messing with this for weeks now, and it’s crazy frustrating to think I know what’s going on but not know how to fix it!!

  13. Now I have another theory I’m working on…my virtual box had been on the domain for awhile and inherited a few security policies. I’m wondering if the scripts aren’t executing because they require a login, and when on the domain we have both a ctrl+alt+del requirement and a interactive text. I’m changing these polcies, recapturing the image, and going yet again…

  14. unreal, made the policy changes and recaptured the image, redeployed, still didn’t auto-login.

  15. Got it resolved. The problem was due to a capture that did not properly execute sysprep before capturing the image. Sysprep did not run because a modification had occured in a core LiteTouch script in order to work pass a Clone-Tag issue in Windows 8. I commented a line out back in April and had completely forgotten about it. Bad bad idea. Ultimatiely after I redeployed my virtual from VM, sysprepped and recaptured, deployment went the smoothest it ever has…except for an unattend.xml error due to IE10 Welcome startup. Sheesh…what a weekend, now back at work. CHEEERs.

    • Good to hear you resolved the issue. Well I’m planning on doing a live stream on this topic during Labor Day weekend. Thinking about doing it this Saturday.

      • I have been fighting this same issue for a week. I swear every time I install MDT I run into a new issue. I have 2 servers running right now, that are configured identically. The first server, which is going away, captures ok using your method. Prior to 2012 I never had an issue using the capture TS. My new server running the same version, runs into the disk space issue, with winPE trying to run on the system reserved partition. If I try to run the capture TS, it again captures the image and fails during the install of the image in an unrecoverable installation state. This is becoming increasingly frustrating.

        I’m using a hyperV VM vanilla install of windows 7x64sp1.

  16. Hello,
    Thank you very much for this nice guide. It is very helpful.
    I’m new to MDT 2012 and other windows deployment stuff and therefore ran into some problems.
    I have followed your guide in every way, but somehow the capture task sequence dosnt do anything.
    It dosnt come with any erorrs or warning, it just dosnt capture anyhing?

    Here is a link, where your can see the windows that appears when im doing it (Somehow i dont even get the window where to store the captured image)

    http://postimg.org/gallery/bcxjovjs/

    Do you have any clue what i am doing wrong?

    • Well, I have many people that are having issues with the capture part of MDT. I am doing a Google+ Hangout event of me setting up the MDT and capturing a Windows 7 machine. A very basic capture.

    • what’s your customsetting.ini look like?

      • [Settings]
        Priority=Default
        Properties=MyCustomProperty

        [Default]
        OSInstall=Y
        SkipBDDWelcome=YES
        SkipAppsOnUpgrade=YES
        SkipCapture=NO
        SkipAdminPassword=YES
        SkipProductKey=YES
        SkipDeploymentType=YES
        SkipApplications = YES
        SkipComputerBackup=YES
        SkipProductKey=YES
        SkipComputerName=NO
        SkipBitLocker=YES
        SkipDomainMembership=YES
        SkipLocaleSelection=YES
        SkipTimeZone=YES

        MachineObjectOU=OU=A2 Client Computers,DC=A-2,DC=LOCAL
        KeyboardLocale=da-DK
        UserLocale=da-DK
        KeyboardLocalePE=da-DK

        These settings are for automating the process when setting a new image up (My company already got a image running, i just need to update it and therefore needs to capture a new image).
        Do I need to changes the custom.ini file, when im doing a sysprep & capture?

        Its the google hangout event available anywhere? Unfortunately i wasnt able to there.

      • okay did you declare a location for your capture OS? also I did a livestream event dealing with common issues with sysprep and capture within MDT 2012 and show everyone how I normally do. did everything live with a working capture and deployment of the capture image. it’s pretty long, but worth the viewing. check it out and if you still have more question we could do a google+ hanghout. here is the video link goo.gl/O9H7KC.

        thanks

  17. Just a follow up to previous post….

    My traditional capture TS using sysprep did indeed work.. the problem was with deploying the image via TS. The problem had to do with Internet Explorer 10 being installed in the image. There is a setting in the unattend file for a welcome message located in the Specialize phase. if you disable that setting, the image will install correctly.

    • good to know. i will add that to the records. by the way, doing a livestream event this Sunday on this topic. please share and stop by to support. it’s at 12pm EST.

  18. Hi there sorry for the late post. i am having an issue with capturing a reference image.
    I have done the sysprep manually and created the same task sequence where i disable sysprep. I have followed these same instructions before and it worked a couple 6 months ago i think.
    The computer does sysprep but when i try to capture it with my mdt2012 it gives me the following error.

    Litetouch deployment failed, Return code = -2147467259 0x80070070)
    Failed to run the action: apply Windows PE.
    There is not enough space on the isk. (Error: 80070070; source: windows)
    The execution of the group (Capture Image) has failed and the execution has been aborted. An action faied.

    I have close to 100gb of free space on the drive so i know its not a space issue. Can you advise on what i can do? I have also tried to do a sysprep and capture task sequence before but as it is sysprepping it will end all network connections and loose connection to my mdt.

    • I did a live stream on this. please check out the video :

      • Thanks for your response i will try this tomorrow and see if works. i had originally syspreped the machine and try to run the capture and that is how i got the 8 errors while capturing. i will give this a try and thanks for your videos they are very helpful.

  19. you sir are a genious!!!!! thank you soo much i have been struggling with this issue and seems to be working now. Thanks a lot, i will go ahead and like the video.

  20. Hello again 🙂
    I finally manged to fully capture a image and deploy it using MDT 2012, with new applications, drivers etc.
    I really appreciate your guide and your help – Thanks a lot! 🙂

    I only have 1 smaller problems now, when deploying my image:

    Everytime I deploy a image, i get the following message:
    http://tinypic.com/view.php?pic=e1em2b&s=5

    It’s danish language 🙂 (In english it says: activation period has expired).
    How do I prevent this? – There is no problem when I say Activate Now.
    I have put a script in my task sequence later on, that automatically activates windows).

    On our previous image, in my company, there are no problems – And I use the exact same windows key.

    The first few deployments i made, it didnt appear. I suspect that it something to do when I captured the image and I changed the Rearm settings (It wasnt possible to sys prep the image, if I didn’t do it).

    Have this error ever occured to you?

    Best Regards,

    Henrik Holm

  21. My issue is…working with an actual machine, not a virtual machine. The Dell Latitude 10 ST2 does NOT have PXE ability so I’m using MDT. The issue is that it fails using Sysprep and Capture, stating that its failing on the User Restore section. I don’t even want to do any USMT stuff right now. I don’t get why my Capture is trying to gather or restore user files. I just want to capture the thick image as is. Any ideas?

  22. Shankar Kumar // December 8, 2013 at 2:10 pm // Reply

    Hi,

    When try to capture the Custom Image of Windows XP for MDT 2012 Update 1 getting the below error.

    ZTI Non Zero return Code by ZTIBackup rc=2
    return Code=-2147467259 0X080004005
    Error Creating an image of drive c: rc=2

  23. I wish i could see actual work you doing instead of your camera. You don’t go through talking every step as you doing on the screen. You do have a knowledge, but it’s hard to follow on the small screen you displaying. You can make camera picture smaller. Little over talk, but that’s ok.

  24. Can you explain the purpose of sysprepping a machine during the Capture? Before I used MDT and had another program to get to PXE, the capture was never sysprepped, only the deploy. Why do it at both ends?

    • here are some key points on why Sysprep is important: (hope it helps)
      1 – Removes the computer name; whereas a unique SID might not be required in some environments, unique computer names are certainly essential
      2 – Removes the computer from the Windows domain; this is necessary because the computer has to be added to Active Directory with its new name
      3 – Uninstalls plug and play device drivers, which reduces the risk of hardware compatibility problems; required drivers will be installed automatically on the target machines
      4 – Can remove event logs (reseal parameter); this is useful if you have to troubleshoot a target machine
      5 – Deletes restore points; if you have to use system restore on the target machine, you could run into problems if you use a restore point from the master PC
      6 – Removes the local administrator’s profile and disables the account; this ensures that you don’t accidentally copy your files to the target machines and leave the admin account unprotected
      7 – Ensures that the target computer boots to Audit mode, allowing you to install third-party applications and device drivers
      8 – Ensures that mini-setup starts after booting up the first time, allowing you to configure the target computer’s new name and other configurations
      9 – Allows you to reset the grace period for Windows product activation (rearm) up to three times; this gives you more time to activate target computers

      • I understand what sysprep does 🙂 I get it that its needed when deploying an image onto a target machine. But MDT does it twice…once also during the capture. Also, if a machine is on a domain during MDT Sysprep and Capture, it fails because the machine is in fact on the domain. The whole rearm thing is gone with MDT 2013, so I just use VM’s to build my image and snapshot them back after capture/sysprep. I do find a need to prevent sysprep during capture sometimes, as when I want to merely capture a machine whole, as the case when mfg’s don’t make CAB files available. Anyway, I was just curious. Thanks

      • okay, lol that makes sense. I think the second sysprep is a mistake on Microsoft part. I believe I create another video disabling both sysprep and manually it for a custom image.

  25. After watching your livestream video, I was able to get an image captured. Thank you for the detailed walk through. I put the system into audit mode and made all of my customization and updates. This included setting a desktop background and certain shortcuts I need to be there in the image. This all went away during the sysprep process. Is there a way to include these in my image? If this has already been answered please point me in the direction of the answer. Thank you.

  26. Hi,
    Here is my scenario. I deployed an image from MDT 2013 and updated it on a laptop. Now I want to sysprep and capture it. When I do it, I receive an error that it can’t find the sysprep file. Any ideas?

  27. Hi,
    I follows the same steps as senario # 3 , i’m capturing Windows 8.1 Ent. and I still get an error message:

    Error creating an image of drive C:, rc = 6
    ZTI Error: Non-zero return code by ZTIBackup, rc= 6
    Litetouch deployment failed, return code = -2147467259 0x80004005

    please help.

    thanks,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s