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.
I just drop it into the c:\windows\system32 on my reference image... ;)
That is what this is doing. You could run this step in a build and capture as well to automate it.
Hi Justin, I adapted this into my task sequence but if I use the command 'cmd /c xcopy x:\sms\bin\x64\CMTrace.exe %OSDTargetSystemDrive%\windows\system32 /E /H /C /I /Q /Y' it seems that the TS is halted and in background the cmd.exe/xcopy command is actually
waiting for confirmation if the destination is a folder to be created.
Thanks. Just works as demonstrated on the page. The prblem is that in sme versions of SCCM 2012 it looks like Ms has taken away the F8 feature. So once the new windows image has been applied you no longer have access to F8 command console. How does one
get cmtrace console up and running ?
@Nalin I'm not aware of these changing to this command prompt works fine for me in the full OS part of the TS
To avoid halting the TS just add a "\" at the end of "System32" like this: cmd /c xcopy x:\sms\bin\x64\CMTrace.exe %OSDTargetSystemDrive%\windows\system32\ /E /H /C /I /Q /Y
Got the same problem with the halted TS and solved it.