MEMCM: Set Component Log File Size

One common task that you might have to do in your environment is configure the log file size for the various MEMCM components (such as distmgr.log, wsyncmgr.log, etc.). These would be all of the logs on your primary site server that are in the <MEMCM install dir>\logs directory, or any server in which the “Component server” role is installed (so management points, software update points, etc).

The default size for the majority of MEMCM components is 2MB, which in most environments is not enough.

This post discusses two of the ways to set this size. It primarily focuses on a PowerShell script that will set all of these automatically, and accounts for new components added in future releases.

Manually Update Log Size

The log size of the individual MEMCM components can be manually adjusted from the Configuration Manager Service Manager.

  1. Launch the MEMCM console and go to the Monitoring workspace.
  2. Expand System Status and click Site Status.
  3. From the ribbon, click Start, then Configuration Manager Service Manager.
  4. Find the component to change the log file size (ex. SMS_DISTRIBUTION_MANAGER).
  5. Right-click the component and select Logging.

  1. Enter the new log size and click OK.

That’s it. The log size is immediately set and distmgr.log will now be 10MB.

Script Method

That might be a little time-consuming to do for every component. This value is also stored in the registry and can be changed via a PowerShell script. Here is a script that will set the size to 10MB on all components running on the server.

$log_size = "10485760"

# get all components
$reg_keys = (get-childitem -path HKLM:\SOFTWARE\Microsoft\SMS\Tracing).name | Foreach-Object {$_ -replace "HKEY_LOCAL_MACHINE", "HKLM:"}

# loop through each component, setting the max log file size
ForEach ($reg_key in $reg_keys) {

$component = $reg_key.replace("HKLM:\SOFTWARE\Microsoft\SMS\Tracing\","")
$cur_log_size = (get-itemproperty -path $reg_key).MaxFileSize

# set log file max size if current size is less than desired size
if ($cur_log_size -lt $log_size) { 
Set-ItemProperty -path $reg_key -name MaxFileSize -value $log_size
write-host "$component changed to $log_size" -foregroundcolor green

# report to screen that log file is already set to desired size
if ($cur_log_size -eq $log_size) { 
write-host "$component already set to $log_size" -foregroundcolor cyan

# report to screen that log file is set to a higher desired size
if ($cur_log_size -gt $log_size) { 
write-host "$component set to higher value of $cur_log_size" -foregroundcolor magenta

# clear used variables for next loop
$component = ""
$cur_log_size = ""

All you need to do to run this script is set the $log_size variable to your desired size. I would suggest setting one log file manually, looking at the corresponding registry key, and then coping the decimal value over. That way, you know for sure that you have the right value.

  1. Go through the steps for manually setting the log file size.
  2. Open Registry Editor and navigate to the component you set. For SMS_DISTRIBUTION_MANAGER, that is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Tracing\SMS_DISTRIBUTION_MANAGER.
  3. The value is available in the MaxFileSize key value (the value in parentheses).

This script will set the log file size, unless the log file size is already equal to or greater than the size you specify, and output what it set to the screen.


All content provided on this blog is for information purposes only. Windows Management Experts, Inc makes no representation as to accuracy or completeness of any information on this site. Windows Management Experts, Inc will not be liable for any errors or omission in this information nor for the availability of this information. It is highly recommended that you consult one of our technical consultants, should you need any further assistance.


Picture of Matt Tinney

Matt Tinney

Professional IT executive & business leader having decades of experience with Microsoft technologies delivering modern-day cloud & security solutions.

Contact Us

On Key

More Posts

E-Commerce Security - Solutions for Online Retailers

E-commerce Security – Solutions for Online Retailers

Today’s hyper-charged e-commerce landscape demands top-notch cybersecurity measures. Cybersecurity for this bustling sector isn’t just about ticking a technical box; it’s the cornerstone of building trust. As businesses and consumers flock to the online space, the

Read More »
WME Cybersecurity Briefings No. 017
Cyber Security

WME Security Briefing 08 July 2024

SnailLoad: A New Stealthy Threat to Web Privacy Overview: Researchers discover a concerning new side-channel attack technique: SnailLoad. It exploits inherent weaknesses in the internet to potentially monitor a user’s web activity without requiring any direct access to

Read More »
WME Cybersecurity Briefings No. 016
Cyber Security

WME Security Briefing 27 June 2024

ExCobalt Cyber Gang Targets Russian Sectors with New GoRed Backdoor Overview An unknown Golang-based backdoor GoRed is being employed by the cybercrime gang ExCobalt. This group has roots dating back to at least 2016 and possibly originates

Read More »
Top 7 Office 365 Backup Solutions
Cloud Computing

Top 7 Office 365 Backup Solutions

Let’s explore the top 7 Microsoft 365 (Office 365) backup and recovery solutions. These solutions feature, among others, automated backups, detailed reporting, and efficient deduplication. We will guide you through their pros and cons and what

Read More »
WME Cybersecurity Briefings No. 015
Cyber Security

WME Security Briefing 24 June 2024

Google’s Privacy Sandbox Faces Scrutiny Over User Tracking Allegations Overview Google’s Privacy Sandbox was initially designed to replace third-party cookies in Chrome. It was a more privacy-conscious solution, but the Austrian privacy group Noyb is now

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.