Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Configure Log File Settings for the Intune Management Extension

March 21, 2025
in Blog, Intune
0
ADVERTISEMENT

Table of Contents

The Intune Management Extension service is responsible for executing PowerShell scripts and Win32 apps on managed devices. When these scripts and apps fail to run or encounter errors, it’s important to have log files that can help you diagnose and troubleshoot the issues. Without proper log file settings, you might miss important details that can help you resolve issues quickly and effectively.

In this article, I’ll explain why configuring log file settings is important and show you how to configure these settings using PowerShell.

Default Log File Settings for the Intune Management Extension

By default, the Intune Management Extension service stores log files in the following directory: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs.

The service retains 3 log files:

  • The file IntuneManagementExtension.log which always contains the latest information
  • Two archive files IntuneManagementExtension-<timestamp>.log. Each file has a maximum size of about 3 MB. When the IntuneManagementExtension.log file reaches its maximum size (about 3MB per file), this file is renamed to IntuneManagementExtension-<timestamp>.log.
TCZkdcq4C6RfGmR4WQfS0OPJ31TaQuKwTXtPsOVnHVhgLCnu0JCExFm5IGW3

Configuring Log File Settings for the IEM

The following script configure logs settings to increase the log file size and retention for the Intune Management Extension service to enable extended log analysis for troubleshooting and monitoring purposes.

Specifically, you’ll need to set:

  • LogMaxSize: the maximum log file size in bytes
  • LogMaxHistory: the maximum number of log files to retain, respectively.
Note Note: LogMaxHistory is only for archive files. So, if you set the value to 5, there will be 6 files kept (the IntuneManagementExtension.log file and 5 archive versions).

Here’s an example PowerShell script that sets the LogMaxSize value to 10 MB (which is 10,485,760 bytes) and the LogMaxHistory value to 10, which will keep up to 10 versions of the log file with a maximum size of 10 MB each. The script then restarts the Intune Management Extension service to apply the changes.

Of course, you can deploy this script with Intune.

# Set the maximum log file size in bytes (10MB)
$maxLogSizeInBytes = 10485760

# Set the maximum number of log files to retain
$maxLogFiles = 10

# Check if the logging key exists and create it if it doesn't
$regPath = "HKLM:\SOFTWARE\Microsoft\IntuneWindowsAgent\Logging"
if (-not (Test-Path -Path $regPath)) {
    $null = New-Item -Path $regPath
}

# Set the registry values for the log file settings
Set-ItemProperty -Path $regPath -Name "LogMaxSize" -Value "$maxLogSizeInBytes"
Set-ItemProperty -Path $regPath -Name "LogMaxHistory" -Value "$maxLogFiles"

# Restart the Intune Management Extension service to apply the changes
Restart-Service -Name "IntuneManagementExtension"
O7Os955O0YWgKdhcjeNzt5YB05aLKT54yVtXtONFBtdBy2bZnpnhyyOCeCxw

Conclusion

Deploying applications with Microsoft Intune provides a centralized, secure, and cost-effective way to manage and distribute software in an organization. With the ability to monitor the deployment progress from the Intune admin portal, IT administrators can ensure that the applications are deployed and functioning as intended on their managed devices.

Related: Below is the list of our posts that will help you to configure and manage devices

  • Prepare Win32 app package for upload.
  • Understanding Intune Detection Rules.
  • Deploy an Win32 App with Dependencies.
  • Upgrade or Replace app with Supersedence in Intune.
  • Assign Apps to Groups with Microsoft Intune.
  • Force sync devices in Intune.
  • Access and Read Intune Management Extension Logs.
  • Deploy Microsoft Store Apps Using Intune.
  • Deploy PowerShell Script using Intune
5/5 - (1 vote)
Previous Post

Get the Last Password Change Date Using PowerShell in Microsoft 365

Next Post

How to Hide Clock and Date from Taskbar on Windows 11

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

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

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory