Justin Chalfant's Blog

Justin Chalfant's Configuration Manager Blog

Copy CMTrace.exe into the Full Windows OS in a task sequence

Copy CMTrace.exe into the Full Windows OS in a task sequence

  • Comments 3
  • Likes

Scenario:

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.

CMTrace

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.

Copy

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.

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of any included script samples are subject to the terms specified in the Terms of Use

Comments
  • 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.

  • thank you.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment