Living Table of Contents
- MDT Tutorial: Prologue & Requirements
- MDT Tutorial Part 1: Installation
- MDT Tutorial Part 2: Initial Configuration
- MDT Tutorial Part 3: Imaging
- MDT Tutorial Part 4: CustomSettings.ini
- MDT Tutorial Part 5: Bootstrap.ini
- MDT Tutorial Part 6: Customizing Boot Media
- MDT Tutorial Part 7: Customizing Base MDT Template & ADK WinPE Template WIM
- MDT Tutorial Part 8: Unattend.xml
- MDT Tutorial Part 9: Logging
- MDT Tutorial Part 10: CustomSettings.ini Validation Testing & Troubleshooting Part 1
- MDT Tutorial Part 11: Troubleshooting Part 2: Windows could not parse or process unattend answer file [C:\windows\Panther\unattend.xml] for pass [specialize]. The answer file is invalid.
- MDT Tutorial Part 11: Troubleshooting Part 3: Windows could not parse or process unattend answer file [C:\windows\Panther\unattend.xml] for pass [specialize]. The answer file is invalid.
- MDT Tutorial Part 11: Troubleshooting Part 4: Task Sequence Variable is Being Overwritten
- MDT Tutorial Part 11: Troubleshooting Part 5: Invalid DeploymentType value “” specified. The deployment will not proceed.
- MDT Tutorial Part 11: Troubleshooting Part 6: Unable to mount the WIM, so the update process cannot continue
- MDT Tutorial Part 11: Troubleshooting Part 7: Non-Fatal OSD Errors & Warnings
Today’s Agenda: Troubleshooting
- CustomSettings.ini Validation Testing
- Troubleshooting OSD Issues
- Save time (and avoid pain) – Create a MDT simulation environment
- Quick and Dirty – Testing customsettings.ini variables in MDT
- MDT – Custom Property: Set your environment in testing or production
- SCCM 2012 – How to catch errors in Task Sequence
- Operating System Deployment Logs
- Error handling in TS without MDT using OSDBackground
CustomSettings.ini Validation Testing
If you haven’t already done so, go ahead and make some useful edits to your CustomSettings.ini. Since my aim is to have a dedicated ‘build’ machine that boots and automatically images the proper Task Sequence, this is what my CS.INI looks like now:
[Settings] Priority=MACAddress,GetAbbrModel,Build,Default Properties=AbbrModel ;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ; BEGIN MACADDRESS SECTION ; This is my Windows 10 v1511 build VM [00:15:5D:13:79:01] SkipTaskSequence=YES TaskSequenceID=B151164ENT SkipComputerName=YES SkipDomainMembership=YES JoinWorkgroup=BLD-WrkGrp SkipUserData=YES SkipComputerBackup=YES SkipProductKey=YES SkipLocaleSelection=YES SkipTimeZone=YES SkipAdminPassword=YES SkipCapture=YES SkipBitLocker=YES SkipSummary=YES ; END MACADDRESS SECTION ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ; BEGIN GETABBRMODEL SECTION ; Lets get the abbreviated model [GetAbbrModel] UserExit=jgp_GetAbbrModel.vbs AbbrModel=#GetAbbrModel# ; END GETABBRMODEL SECTION ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ; BEGIN BUILD SECTION ; Set things here for use below [Build] OSDComputerName=%OfficeCode%-%AbbrModel%-#UCase(Right(Replace(Replace("0000000%SERIALNUMBER%"," ","",1,-1,1),"-","",1,-1,1),8))# ; END GETABBRMODEL SECTION ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ; BEGIN DEFAULT SECTION [Default] OSInstall=Y SkipTaskSequence=NO SkipComputerName=NO SkipDomainMembership=NO SkipUserData=NO SkipComputerBackup=NO SkipProductKey=NO SkipLocaleSelection=NO SkipTimeZone=NO SkipAdminPassword=NO SkipCapture=NO SkipBitLocker=NO KeyboardLocale=en-US UserLocale=en-US UILanguage=en-US ; https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx TimeZoneName=Eastern Standard Time SLShare=%DeployRoot%\TSLogs SLShareDynamicLogging=%DeployRoot%\TSLogs\%OSDComputerName% ; END DEFAULTSECTION ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Following the methods outlined in the recommended reading section, set up an area for testing your CustomSettings.ini. When I execute my test, it runs, I see a bunch of data:
There are no obvious errors, I see see some custom properties and various built-in properties getting set so it looks good. Time to execute for real!
Troubleshooting – Part 1
Troubleshooting MDT (and SCCM) is something of an art and this is not a once-size-fits-all silver bullet post.
I ran across this post SCCM 2012 – How to catch errors in Task Sequence around the same time I started using MDT and found it greatly helped me to hone in on OSD issues. Because it has worked well for me, I’m recommending it – and others like it – to you.
Task Sequence Setup
Take a look at the links at the top to see how others are setting up their Task Sequences and adjust to suit your needs but here’s a basic example:
Right now when your Task Sequence fails you see this dialog:
This dialog is incredibly helpful without making any adjustments and you should ge able to get an idea as to what went wrong without having to go super deep into the logs. But once you get into a production scenario, you’ll likely suppress this dialog and I find that having the Try/Catch steps in the Task Sequence makes it easier from a log reviewing perspective, especially after the Task Sequence gets busy.
Crack open the smsts.log and immediately you see red:
With the Try/Catch model you can easily hone in on the offending step:
- Scroll to the bottom of the log
- Search for key text in the log
- Option 1: Search for: Try) ignored
- Option 2: Search for: Catch) has been
- Option 1: Search for: Try) ignored
Either one will get you just a few short lines away from the failure, so scroll up a bit and it should become apparent.
- The blue line above is the ‘Catch) has been‘ match.
- The first red line above that is the ‘Try) ignored‘ line
- Just above that we see the second red line which is the actual failure:
Failed to run the action: This will break it.
- Above that are the details for that specific step.
This is obviously a very simple example, but the process is the same for all errors:
- Review the smsts.log
- Find the actual error
- Evaluate if it’s a problem specific to that step OR if it was caused by an environmental issue such as dependencies.
- Review other logs as necessary based on what you’re seeing in the smsts (e.g.: domain join failure)
I don’t expect you to be an expert at this point, but I hope it and the links in the recommended reading section have helped to get you a little more comfortable with searching the smsts.log for errors.
When doing BnC’s I like to keep my changes small and modular:
- Test that the basic BnC works fine: OS is installed, sysprep & capture is succesful
- Add Windows Updates into the mix & repeat the test
- Prepare your application payload:
- for some complex applications you’ll rely on scripts so test them outside of the Task Sequence to confirm they are syntactically correct
- for simple installations make sure you have the correct command line arguments
- once installed validate the installation & configuration
- Introduce applications a few at a time doing BnC’s to ensure nothing is broken.
- Set milestones for yourself so you don’t have to go back to square one
- Backup files (ts.xml, unattend.xml, scripts etc) before you make any changes.
Good Providence to you!