Outlook - Why I need to clear the cache Content.Outlook

Marco Lusardi 1 Reputation point
2023-01-05T10:35:50.58+00:00

Hello,

Outlook has a cache "%LocalAppData%\Microsoft\Windows\INetCache\Content.Outlook" where attachment files are temporarily placed while the email is a draft. Normally when the email is sent the attachment files are deleted from the cache.

My problem:
In a Windows Server 2019 terminal server environment that I manage some users have their Outlook cache that won't clear.

Workaround:
I use a powershell script to clear the Content.Outlook folder when the user logs out:

Remove-Item "C:\Users\$env:UserName\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\*" -Recurse -Force  

The script PowerShell is execute by a Logoff GPO "User Configuration -> Policies -> Windows Settings -> Script (Logon/Logof)".

276418-logoff-properties-powershell-scripts.png

Question:
Why is the cache folder not cleaned for some users? Do you have any suggestions on how I can check the problem?

Thanks
Marco

Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
3,420 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Faery Fu-MSFT 7,256 Reputation points Microsoft Employee
    2023-01-06T06:28:35.343+00:00

    Hi @Marco Lusardi ,

    As far as I know, the temp folder provides a workspace for the program. Programs can be created there, temporary files for their own temporary use. Every program should delete all its temporary files when it closes, but it doesn't always happen for various reasons (for example, if the program crashes), that's why it's a good idea to periodically clean out anything left there.

    For more details on temporary files, refer to the following links:
    https://www.slipstick.com/outlook/securetemp-files-folder/
    https://www.nucleustechnologies.com/how-to/delete-outlook-temporary-files-in-windows-10.html
    (Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)

    Hope above can help you!