Copy and associate CMTrace using Intune Win32App and PowerShell

I wrote a blogpost on how to make CMTrace which is included in the SCCM client nowadays using a PowerShell script. I got a question basically instantly if that could not be used for Intune managed clients without the SCCM client. Yes! it can, we only need to add a line to copy CMTrace.exe to C:\Windows for instance. And we should of use the best log reader there is when troubleshooting Intune Managed devices as well.

CMTrace is not free, it is included with the Configuration Manager license, which still is valid for use with Intune as Intune includes Configuration Manager CAL(double-check this as some M365 licenses do not) as well.

I also added a simple script to remove CMTrace.exe and the ActiveSetup that we created during install, we maybe want to do that one day.

Start by downloading the script form here:

Then download the Win32appUtil from GitHub if you don’t have it already:

  1. Extract the CmtraceIntune.Zip file to C:\Temp\CMTraceIntune for example.
  2. Copy CMTrace.exe from a computer running the Configuration Manager client to C:\Temp\CMTraceIntune
  3. Use the Win32AppUtil.exe that was downloaded earlier to create a Win32App package that can be uploaded to Intune. For example, with the following information:
  4. Create a new Win32App in Intune with the following program settings. For a detailed guide on how to create a Win32App in Intune check out this post:
  5. As detection method the following can be used.

Then we are ready to deploy the newly created application using Intune and when installed .Log and .Lo_ files are associated with CMtrace


Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.