Answered by:
MDT2013UP1-Image Capture fails on Surface Pro 3
Question
-
I'm currently running MDT 2013 Update 1 on a Windows 2012 R2 with WDS. I imported the OS files, drivers for Surface and created Task Sequence. I boot Surface Pro 3 into PXE and select my task and all works fine, it even loads the OS but when it tries to capture the image as the second phase it always fails with "Expected image state is Image_State_Generalize_Reseal_to_OOBE, actual image state is Image_State_Complete, sysprep did not succeed. Failure 6192, Litetouch deployment failed, return code = -2147467259 0x80004005"
I try capturing the image using a Sysprep and capture, connected to Deployment share and ran LiteTouch.vbs and wizard comes up and it starts to run thru the task but it fails in the same error. Driving me nuts and not sure why it's happening. I need to complete this image ASAP and I'm wondering if I'm hitting a MDT 2013 bug.
thanks in advance.
Answers
-
So my test worked. Here's how I arrived at it and perhaps someone can offer a better solution after this...
Firstly I made sure BitLocker was off and the drive was decrypted. When it failed the first time I noticed in the sysprep log that it was failing when it was trying to do something with that %#@&! Candy Crush Soda Saga that the November update adds. So I uninstalled it, ran my capture task sequence again...and again, same failure. Only this time the failure was with the Twitter app. At this point I said screw it and decided to remove ALL the apps (ie. News, Money, Weather, XBox, etc.) using an elevated PowerShell prompt:
Get-AppXProvisionedPackage -online | Remove-AppXProvisionedPackage -online
Then, since I work for a K-12 school district and the students don't really need those apps, I decided to try to prevent the apps from re-installing for each user, using this powershell command:
Get-AppXPackage -AllUsers | Remove-AppXPackage
After running those two commands, sysprep continued as normal and my image was captured. The second command line may or may not be necessary...I just ran it out of preference. Keep in mind it's easy to re-install any of those apps via the store after deployment if the user wants them back.
Anyway, I think sysprep sees the apps in the new build as user updated, and perhaps that's why it fails? I'm not sure and maybe someone can shed some light on it. But for now I'm able to capture and deploy the new build. Hopefully this helps you guys out.
Good luck.
- Proposed as answer by BWMerlin Tuesday, November 24, 2015 11:22 PM
- Marked as answer by Ty GlanderModerator Tuesday, December 29, 2015 2:59 AM
All replies
-
Me too on a Windows 10 capture from a prebuilt VM. Checked the SYSPREP logs and found an error referring to sysprep not allowed on an upgraded OS which lead me to this link
http://www.harrycaskey.com/how-to-run-sysprep-on-an-upgraded-operating-system/
This resolved my issue :)
Below is the method that I found to work perfectly.
Remove this KEY from the Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\UpgradeRemove this REG_DWORD from the Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\UpgradeSet this REG_DWORD from the Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\CleanupState [Set Hexadecimal Value: 7]Run this command as Administrator:
slmgr /dliAfter your operating system is activated re-run SysPrep and it will work!
-
-
-
Please let me know as I have just run into this issue using the November update.Hi Amador
Have you resolved this yet? Are you trying to capture the latest Win 10 "November update" 1511 build?
If so I might have a solution that I'm testing now as I ran into the same issue.
Good luck
-
So my test worked. Here's how I arrived at it and perhaps someone can offer a better solution after this...
Firstly I made sure BitLocker was off and the drive was decrypted. When it failed the first time I noticed in the sysprep log that it was failing when it was trying to do something with that %#@&! Candy Crush Soda Saga that the November update adds. So I uninstalled it, ran my capture task sequence again...and again, same failure. Only this time the failure was with the Twitter app. At this point I said screw it and decided to remove ALL the apps (ie. News, Money, Weather, XBox, etc.) using an elevated PowerShell prompt:
Get-AppXProvisionedPackage -online | Remove-AppXProvisionedPackage -online
Then, since I work for a K-12 school district and the students don't really need those apps, I decided to try to prevent the apps from re-installing for each user, using this powershell command:
Get-AppXPackage -AllUsers | Remove-AppXPackage
After running those two commands, sysprep continued as normal and my image was captured. The second command line may or may not be necessary...I just ran it out of preference. Keep in mind it's easy to re-install any of those apps via the store after deployment if the user wants them back.
Anyway, I think sysprep sees the apps in the new build as user updated, and perhaps that's why it fails? I'm not sure and maybe someone can shed some light on it. But for now I'm able to capture and deploy the new build. Hopefully this helps you guys out.
Good luck.
- Proposed as answer by BWMerlin Tuesday, November 24, 2015 11:22 PM
- Marked as answer by Ty GlanderModerator Tuesday, December 29, 2015 2:59 AM
-
I noticed the same thing (in my case it was an error with Twitter) so I went to the start menu found Twitter (and Candy Crush, seriously WTF Microsoft, I can understand Twitter but Candy Crush???), right clicked on it and uninstalled it and then captured.
I will take a look at those powershell commands of yours as I would also like to remove the crapware apps but allow users to install them back should they want them.
-
Awesome. Glad that worked...and good to know it's just those two apps that cause the hold up. Also, after deploying and logging in as a new user, all apps except two came back. News and Money didn't come back but XBox, Candy Crush and Twitter did. Go figure. So that second powershell command isn't as useful as it was in 8.1. Maybe it's changed for Win10 but that's research for another day. Happy imaging!
-
I am using a VM to create my base images. I had the same issue trying to capture my Windows 10 Enterprise x64 v1511 build#10.0.10586.0
Uninstalling Candy Crush and Twitter allowed me to finally capture my image.
MS really needs to get there crap together on windows 10 what are they thinking.
-
Store apps are tied to an individual account. Adding Candy Crush and Twitter doesn't seem like an enterprise activity.
Logs are very important. https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Mention any customizations you have made.
-
-
That is so strange. When I did a build and capture of 1511 I didn't have any issues. I will have to try it again.
Logs are very important. https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Mention any customizations you have made.
-
The best way to avoid this issue is to work like this:
1. Create the Capture target in a Legacy Hyper-V Virtual Machine.
2. Upon installing the OS, the Welcome Screen appears, press CTRL+SHIFT+F3 to enter audit mode.
3. Customise
4. Perform Sysprep, or MDT2013 Capture via litetouch.vbs
Happy Capturing!
-
-
Actually just setting this key before running sysprep will work:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State =
IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE
Jose Gonzalez
- Proposed as answer by Ivan Corbett Tuesday, July 26, 2016 1:55 PM
-
Actually just setting this key before running sysprep will work:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State =
IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE
Jose Gonzalez
I tried Get-AppXProvisionedPackage -online | Remove-AppXProvisionedPackage -online and Get-AppXPackage -AllUsers | Remove-AppXPackage on a newly built machine and it still failed. Ultimately, Jose's recommendation here with the registry setting is the one that fixed my issue.
- Edited by Vincestrem Tuesday, July 12, 2016 3:48 PM
- Proposed as answer by G_W_ Thursday, August 9, 2018 1:56 PM
- Unproposed as answer by G_W_ Thursday, August 9, 2018 1:56 PM
-