I often work with customers using operating system deployment. We usually end up using CMTrace.exe (Log viewing tool for ConfigMgr 2012) to troubleshoot or understand what's happening in the background.
This is really easy to do in WinPE (Windows PE) portion of a task sequence since CMTrace.exe is built into the boot image in ConfigMgr 2012 R2.
Once the task sequence installs the operating system, it will then reboot into the full operating system from WinPE. Viewing logs becomes a little more tricky now since CMTrace.exe is not built into any of our operating systems.
You would have to map a network drive to a location where CMTrace.exe is located to view logs in while running a task sequence after you are in the full OS.
Adding CMTrace.exe into the full OS:
I’m going to show an easy way to copy CMTrace.exe while still in WinPE phase of the task sequence to the volume where the OS WIM was applied.
We will use the “Run Command Line” step in the task sequence right after the “Apply Operating System” step. At this point of the task sequence, we are still in WinPE so we will have access to CMTrace.exe from the X: drive.
The command line we need to run is for x64 boot images: cmd /c xcopy x:\sms\bin\x64\CMTrace.exe %OSDTargetSystemDrive%\windows\system32\ /E /H /C /I /Q /Y
The command line we need to run is for x86 boot images: cmd /c xcopy x:\sms\bin\i386\CMTrace.exe %OSDTargetSystemDrive%\windows\system32\ /E /H /C /I /Q /Y
This is simply going to copy CMTrace.exe WinPE / X: drive to the volume where the OS WIM file was applied.
This will allow us to run CMTrace.exe when we get into the full OS portion of the task sequence or anytime after the task sequence is completed as well.
If you are running a “Build and Capture” task sequence it would probably make more sense to run this step during that instead of the deploy task sequence.