Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

Copy and associate CMTrace using Intune Win32App and PowerShell

Posted on December 7, 2018February 26, 2019 by Jörgen Nilsson

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: CmtraceIntune.zip

Then download the Win32appUtil from GitHub if you don’t have it already: https://github.com/Microsoft/Intune-Win32-App-Packaging-Tool

  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: https://ccmexec.com/2018/10/intune-win32-app-deployment-a-gamechanger/
  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

  • CMtrace
  • Powershell
  • 5 thoughts on “Copy and associate CMTrace using Intune Win32App and PowerShell”

    1. Cristopher says:
      February 26, 2019 at 8:07 pm

      Awesome idea. Quick observation: The last line in the install script has an extraneous forward slash just after “Register File Types” in the double quotes.
      The slash breaks intended functionality of removing the question CMTrace asks.

      Reply
      1. Jörgen Nilsson says:
        February 26, 2019 at 10:08 pm

        Well spotted! thank you!
        Updated the download now.
        Regards,
        Jörgen

        Reply
    2. Pingback: Troubleshooting Intune Win32app deployments – CCMEXEC.COM – Enterprise Mobility
    3. Carlos Espinosa says:
      January 17, 2020 at 5:36 pm

      The registry keys are not being written when deployed via intune. Using Win 10 Enterprise 1903. has the ability to write to the registry via Powershell “IntuneApps” been disabled?

      Reply
    4. Pingback: Delivering CMTrace using Intune during AutoPilot – Roberts Blog

    Leave a Reply Cancel reply

    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.

    My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
    All code is provided "AS-IS" with no warranties.

    Tweets by ccmexec

    Recent Posts

    • Configuring MS Edge Security Baseline v107 using Settings Catalog
    • Configuring Desktop App Installer using CSP and script?!
    • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell
    • MMUGSE – physical event 2022-10-19 @Microsoft Reactor Stockholm.
    • Switch to Private Firewall profile on AAD joined when connected to specific network.

    ©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
    This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
    Privacy & Cookies Policy

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT