ConfigMgr LogFile Opener released

Today, I’d like to introduce you to a new Tool, on which I was working for the last few weeks. The main purpose of the Tool is to automate CMTrace, CMLogViewer and OneTrace to open relevant log files instantly from Remote Computers. For me this Tool is a huge Timesaver when troubleshooting Client side issues in ConfigMgr. The Tool is based on PowerShell and is called “ConfigMgr LogFile Opener”

You can download the latest version of the tool on GitHub.

Getting CMTrace

CMTrace can be found in the Installation folder on the Configuration Manager Primary Site Server.

Example: D:\Microsoft Configuration Manager\CMTrace.exe

It is also available on every system, where the ConfigMgr Client is installed:

C:\Windows\CCM\CMTrace.exe

Getting CMLogViewer

CMLogViewer is part of the Configuration Manager Support Center. The Setup can be found in the Installation folder on the Configuration Manager Primary Site Server.

Example: D:\Microsoft Configuration Manager\tools\SupportCenter\supportcenterinstaller.msi

After installation, the binary can be found at:

C:\Program Files (x86)\Configuration Manager Support Center\CMLogViewer.exe

Getting OneTrace

OneTrace is part of the Configuration Manager Support Center. The Setup can be found in the Installation folder on the Configuration Manager Primary Site Server.

Example: D:\Microsoft Configuration Manager\tools\SupportCenter\supportcenterinstaller.msi

After installation, the binary can be found at:

C:\Program Files (x86)\Configuration Manager Support Center\CMPowerLogViewer.exe

Parameters

Below is a list of possible parameters. Note that the list below always reflects the latest version of ConfigMgr LogFile Opener. Some Parameters might no be available in older releases.

As of now, all Parameters are optional and can be used to change the default behaviour of ConfigMgr LogFile Opener.

ParameterDescription
-HostnameCan be used for a direct connection to a client device. Otherwise the Tool will prompt you to specify the Hostname
-CMTraceCan be used to specify a different location for CMTrace.exe. The Tool will look by default at “C:\Windows\CMTrace.exe”
-CMLogViewerCan be used to specify a different location for CMLogViewer.exe. The Tool will look by default at “C:\Program Files (x86)\Configuration Manager Support Center\CMLogViewer.exe”
-OneTraceCan be used to specify a different location for CMPowerLogViewer.exe. The Tool will look by default at “C:\Program Files (x86)\Configuration Manager Support Center\CMPowerLogViewer.exe”
-ClientLogFilesDirCan be used to specify a different location for the ConfigMgr Client LogFiles. e.g. ‘c$\Program Files\CCM\Logs’
-ActionDelayShortCan be used to specify the amount of time in milliseconds, the Script should wait between the Steps when opening multiple LogFiles in GUI Mode. Default value is 1500
-ActionDelayLongCan be used to specify the amount of time in milliseconds, the Script should wait between the Steps when opening multiple LogFiles in GUI Mode. Default value is 2500
-LogProgramCan be used to specify which Log Program should be active when the tool is starting. Possible values are “CMTrace, “CMLogViewer” and “OneTrace”. Default value is ‘CMTrace’
-LogProgramWindowStyleCan be used to specify the WindowStyle of CMTrace and File Explorer. Possible values are “Minimied”, “Maximized” and “Normal”. Default value is ‘Normal'”
-DisableHistoryLogFilesIf specified, the Tool won’t open any history log files
-RecentLogLimitCan be used to specify the number of recent log files which will be listed in the menu. Default value is 15″
-DisableUpdaterIf specified, the Tool won’t prompt if there is a newer Version available
-EnableAutoLogLaunchIf specified, the Tool will automatically open the corresponding logs when executing client actions

Parameter Example:

Directly connect to ‘PC01’, with the LogFiles available at ‘c$\Program Files\CCM\Logs’ and CMTrace being displayed maximized:

.\ConfigMgr_LogFile_Opener.ps1 -Hostname 'PC01' -ClientLogFilesDir 'Program Files\CCM\Logs' -LogProgramWindowStyle 'Maximized'

Using the Tool

Using the Tool is pretty straight forward. First, download the Tool from the Link above and launch it in PowerShell. Enter the Name of the Computer, on which you want to display the logfiles from.

You can now select from the below Actions. Currently Actions 1-19 open log files and Actions 50-54 will open file explorer to manually view some log related folders.

Using Action 93, you can view and open single LogFiles based on their Modify Date.

Using Action 96, you can execute many different actions on the connected Device, like updating the Machine Policy for example.

Using Action X, you can view the Tool Options. Here you can modify Options like the LogProgram to cycle between CMTrace, CMLogviewer and OneTrace. You can also install or remove the ConfigMgr Console Extension and the PendingReboot PowerShell Module.

Using the Console Extension, you can directly start ConfigMgr LogFile Opener and connect to the selected device from the ConfigMgr Console.

Below, you can see an older version of the tool in action.

Click on the above image to start the Playback.

Let me know in the Comments below or on Twitter, if you have any suggestions for extending the Tool. 🙂

11 Comments

  1. sccm_buff 21. November 2016
  2. Michael 4. December 2016
    • mm Simon Dettling 4. December 2016
  3. tom 14. December 2016
    • mm Simon Dettling 14. December 2016
  4. Peter Häcker 15. December 2016
    • mm Simon Dettling 15. December 2016
  5. Mike 17. July 2017
    • mm Simon Dettling 17. July 2017
  6. Pawan Tiwari 15. September 2020
    • mm Simon Dettling 15. September 2020

Leave a Reply

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