Hi Yvonne
Thank you for reaching out to Microsoft Q&A forum.
Based on your question, beside Q&A Assist support, I would like to share some additional information:
In Exchange Server Subscription Edition (SE), log locations are the same as recent on - premises Exchange versions (Exchange 2016/2019), unless they were manually changed in the configuration.
- Main Exchange logging folder:
C:\Program Files\Microsoft\Exchange Server\V15\Logging\
- Mail flow & transport logs:
%ExchangeInstallPath%\TransportRoles\Logs\
Includes message tracking, protocol (SMTP send/receive), agent, routing, and connectivity logs.
- IIS (OWA, ECP, EWS, ActiveSync) logs:
C:\inetpub\logs\LogFiles\
- Exchange setup / upgrade logs:
C:\ExchangeSetupLogs\ExchangeSetup.log
Please note that actual paths can be customized. To confirm the configured paths on your server, you can also check via Exchange Management Shell.
For official Microsoft documentation, please refer to: Transport logs in Exchange Server | Microsoft Learn
Checking log age using PowerShell
To check the oldest or newest log files in a specific folder (example: Message Tracking):
Oldest log files
Get-ChildItem "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking" -Recurse |
Sort-Object LastWriteTime |
Select-Object -First 5 FullName, LastWriteTime
Newest log files
Get-ChildItem "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking" -Recurse |
Sort-Object LastWriteTime -Descending |
Select-Object -First 5 FullName, LastWriteTime
To list logs older than a specific number of days (example: 30 days):
$Days = 30
Get-ChildItem "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs" -Recurse |
Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-$Days) } |
Select FullName, LastWriteTime
To confirm configured log paths (in case defaults were changed):
Get-TransportService | Format-List *LogPath*
I hope these suggestions provide some helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.