Friday, February 3, 2023
HomePowershellMethods to Disable Outlook Logging & Take away ETL information — LazyAdmin

Methods to Disable Outlook Logging & Take away ETL information — LazyAdmin


Outlook comes with a logging characteristic which is primarily used to troubleshoot Outlook-related issues. However when turned on, Outlook Logging can devour plenty of disk area. So how can we disable it and clear up the log information?

The logging characteristic in Outlook is never used, so it’s really helpful to maintain the characteristic turned off by default. It’s best to solely allow it for a brief time period when troubleshooting Outlook-related points. Regardless that it’s turned off, I’ve seen plenty of circumstances the place the log information are generated however.

On this article, I’ll clarify how one can flip the Outlook logging characteristic off, present you a trick to stop the era of the ETL log information, and clarify how one can take away the log information simply with PowerShell.

What’s Outlook Logging

When you could have returning points with emails that aren’t despatched or different points in Outlook, then you’ll be able to allow the troubleshooting logging characteristic in Outlook. It will generate a log file, which is saved in your native appdata temp folder %temppercentOutlook Logging. The file, usually named OPMLog.log, may be opened with notepad and can present you a transaction log of all steps Outlook carried out to ship and obtain your mail.

The transaction log may be enabled in Outlook:

  1. Click on on File > Choices
  2. Choose Superior and scroll a bit down
  3. Verify Allow troubleshooting logging to allow the transaction log
Outlook Logging

You have to to restart Outlook to allow the transaction log. When the characteristic is enabled, you’ll get a warning within the decrease proper nook while you open Outlook that logging is enabled.

logging enabled warning
Outlook Logging Enabled

To view the log file, open the explorer and navigate to %temppercentOutlook Logging. Right here you’ll discover a file OPMLog.log with the transaction log.

ETL Information in Outlook Logging

Apart from the traditional .log information, you’ll most likely additionally discover .ETL information within the folder. These information comprise occasion logs which can be generated by the Home windows system kernel. ETL information are used to research and troubleshoot application-level issues. It’s attainable to open the information with the occasion viewer, utilizing the import operate on the appropriate aspect. However you received’t get a lot helpful data out of it.

The issue with the ETL information is that they’re fairly huge, typically 51.200KB every, and they aren’t getting cleaned up robotically. So this may simply end in a number of GB of disk area that’s being utilized by the out of date log information.

ETL Log file Outlook Logging
ETL information in Outlook Logging

In the mean time it’s nonetheless unclear why the information are generated. It positively hasn’t something to do with the Troubleshooting Logging characteristic in Outlook. I’ve seen some reviews {that a} miss configured mailbox in Outlook could cause the creation of the ETL log information. In these circumstances the purchasers had a number of mailboxes configured in Outlook and one in all them wasn’t accessible anymore. Eradicating the mailbox in query from the Outlook profile solved the difficulty.

However the common feeling in the meanwhile is that that is only a bug in Outlook that Microsoft hasn’t addressed but.

All choices for Disabling Outlook Logging

So earlier than we’re eradicating the ETL information, let’s make it possible for we’ve checked each choice to disable the Outlook logging. We’re going to verify the next choices:

  • Disable Troubleshooting logging in Outlook Choices
  • Verify and set a few registry keys
  • Disable Enterprise logging
  • Verify Group Coverage

Disable Troubleshooting logging

The primary and most evident step is to disable the troubleshooting logging characteristic in Outlook Choices.

  1. Open Outlook
  2. Click on on File > Choices
  3. Choose Superior and scroll a bit down
  4. Uncheck Allow troubleshooting logging to disable the logging
Disable Outlook Logging
Disable Outlook Logging

Verify and set a few registry keys

There are a few registry keys that we will use the allow or disable the logging characteristic. Open the Home windows Registry by urgent the Home windows Key + R, sort regedit, and press enter.

Navigate to HKEY_CURRENT_USERSoftwareMicrosoftOffice16.0OutlookOptionsMail
and make it possible for the worth EnableLogging is about to 0 or doesn’t exist.

We are able to additionally add EnableETWLogging and set it to 0, conform this help article, however that additionally didn’t cease the ETL file creation.

enablelogging registry

Navigate to ComputerHKEY_CURRENT_USERSoftwareMicrosoftOffice16.0OutlookLogging
and create a brand new DWORD_32Bit worth named DisableDefaultLogging and set it to 1

Disable Enterprise logging

Enterprise logging collects extra data than the traditional logging possibility in Outlook. To make it possible for Enterprise logging isn’t configured, we have to verify the present and take away the next registry key:

ComputerHKEY_CURRENT_USERSoftwareMicrosoftOffice16.0CommonLogging
make it possible for the next worth is eliminated: EnableLogging

Verify Group Coverage

The troubleshooting log may also be enabled utilizing a gaggle coverage. Group insurance policies are utilized by IT departments to simply handle settings on all computer systems in a site. In case your pc isn’t a part of a site, then there is no such thing as a must verify the setting.

You’ll be able to set the logging coverage in

Consumer Configuration Insurance policies Administrative Templates Microsoft Outlook 2016 Outlook Choices Different Superior

Ensure that Allow mail logging (troubleshooting) shouldn’t be configured or disabled.

Stop ETL information era

I’ve examined all choices above, and much more, and nonetheless, the ETL information are generated when opening Outlook. There may be nevertheless an possibility (trick) to stop Outlook from creating the ETL information.

  1. Open the native AppData folder (sort %localappdata% within the explorer)
  2. Open the Temp folder
  3. Delete the folder Outlook Logging
  4. Create a brand new textual content file and identify it Outlook Logging. Just be sure you take away the extension .txt from the file identify

This fashion, Outlook received’t be capable of create the folder “Outlook Logging” and in addition received’t be capable of write the ETL information. Eradicating the folder doesn’t appear to trigger another points with Outlook.

Cleanup Outlook Logging Script

We are able to use PowerShell to rapidly take away all ETL information and even the entire Outlook Logging folder from the purchasers. The script under will undergo all consumer’s folders, verify if the folder exists, and take away it.

After the content material is eliminated, it’ll create the “dummy” file to stop the creation of latest ETL information.

# Get all Customers
$Customers = Get-ChildItem -Path "$($ENV:SystemDrive)Customers"

# Course of all of the Customers
$Customers | ForEach-Object {
      Write-Host "Processing consumer: $($_.Title)" -ForegroundColor Cyan
      $path = "$($ENV:SystemDrive)Customers$($_.Title)AppDataLocalTempOutlook Logging"

      If (Check-Path $path) {
        Write-host "Eradicating log information from $path" -ForegroundColor Cyan
        Take away-Merchandise -Path $path -Recurse

        Write-host "Creating dummy file to stop log information" -ForegroundColor Cyan
        New-Merchandise -Path "$($ENV:SystemDrive)Customers$($_.Title)AppDataLocalTemp" -Title "Outlook Logging" -ItemType File
      }
}

To run the PowerShell script, copy it to PowerShell ISE or use one of many different choices defined right here to run PowerShell scripts.

Wrapping Up

Why Outlook retains creating the ETL information continues to be unclear. Even setting the right registry keys received’t forestall Outlook from creating the information. The issue with the ETL information began originally of 2022. In the mean time, there may be nonetheless no everlasting repair for this situation.

You probably have any recommendations on this or questions, simply drop a remark under.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments