Skip to content

Truncate Exchange logs with PowerShell

The Exchange logs disk is getting full, and you want to truncate Exchange logs without a backup. However, if you enable circular logging to clear Exchange database transaction logs, you must unmount and mount the database before changes take effect. What if there is a way to remove Exchange database logs without unmounting and mounting the database? In this article, you will learn how to truncate Exchange database logs with PowerShell.

Information

Before we start, it’s good to know that Exchange database logs should truncate when a backup is running. If it doesn’t run properly, you must troubleshoot and see what is happening. Sometimes you don’t have the time, and the disk is getting full, and you need a temporary fix to clear the Exchange database logs.

There are a couple of ways to truncate Exchange database logs:

  1. Enable circular logging > dismount database > mount database
  2. VSSTester PowerShell script (this article)

Both options will do the same in the end; truncating the Exchange database logs. But, there is a significant difference in how they do it.

Option 1

You have to enable circular logging, unmount the database, and mount the database, which leads to disruption to the users. If the mailbox database is big and there are terabytes of logs, this will take time. In addition, you have to do it after work hours unless you have a DAG and perform a server switchover.

Option 2

It will keep the database mounted. It means that the database will not go offline, and the users don’t get any disruptions. It will also create a snapshot of the database and logs volume.

Before running the script

Currently, the mailbox database log volume shows that only 1,40 GB is free.

Truncate Exchange logs with PowerShell disk full

Prepare truncate Exchange logs PowerShell script

1. Download VSSTester.ps1 PowerShell script:

  • Exchange Server 2013/2016/2019 from here (VSSTester.ps1)
  • Exchange Server 2010 from here (VSSTester_v1.2.ps1)

2. Save it on the Exchange Server

3. Create a scripts folder on the (C:) drive and place the script in C:\scripts.

Scripts folder

Truncate Exchange logs with PowerShell script

To truncate Exchange logs with the VSSTester PowerShell script, follow the below steps:

1. Start PowerShell as administrator and run VSSTester.ps1 PowerShell script.

PS C:\> C:\scripts\.\VSSTester.ps1

2. There are two options. The one that we are looking for is option 1. Test backup using built-in Diskshadow.

Insert 1 and press Enter.

PS C:\> C:\scripts\.\VSSTester.ps1

****************************************************************************************
****************************************************************************************
**                                                                                    **
**                 VSSTESTER SCRIPT (for Exchange 2013, 2016, 2019)                   **
**                                                                                    **
****************************************************************************************
****************************************************************************************



Saturday, October 17, 2020 7:02:38 PM


Please select the operation you would like to perform from the following options:


  1. Test backup using built-in Diskshadow
  2. Enable logging to troubleshoot backup issues


Selection: 1

3. Specify a directory path. For example, C:\temp, and press Enter.

Please specify a directory other than root of a volume to save the configuration and output files.
Directory path (e.g. C:\temp): C:\temp

It will verify the Exchange Server version and the VSS writer status. After that, it will check which mailbox databases are available and ask us which one to backup.

4. In our example, we like to clear the logs of the mailbox database DB02, which is number 1.

Type 1 and press Enter.

Saturday, October 17, 2020 7:09:39 PM
Getting Server name...

--------------------------------------------------------------------------------------------------------------

EX01-2016


Saturday, October 17, 2020 7:09:39 PM
Verifying Exchange version...

--------------------------------------------------------------------------------------------------------------

EX01-2016 is an Exchange 2016 server.


Saturday, October 17, 2020 7:09:43 PM
Checking VSS Writer Status: (All Writers must be in a Stable state before running this script)

--------------------------------------------------------------------------------------------------------------

Writer name: 'Task Scheduler Writer'
   State: [1] Stable

Writer name: 'VSS Metadata Store Writer'
   State: [1] Stable

Writer name: 'Performance Counters Writer'
   State: [1] Stable

Writer name: 'System Writer'
   State: [1] Stable

Writer name: 'ASR Writer'
   State: [1] Stable

Writer name: 'Registry Writer'
   State: [1] Stable

Writer name: 'Shadow Copy Optimization Writer'
   State: [1] Stable

Writer name: 'COM+ REGDB Writer'
   State: [1] Stable

Writer name: 'IIS Metabase Writer'
   State: [1] Stable

Writer name: 'IIS Config Writer'
   State: [1] Stable

Writer name: 'Microsoft Exchange Writer'
   State: [1] Stable

Writer name: 'MSMQ Writer (MSMQ)'
   State: [1] Stable

Writer name: 'WMI Writer'
   State: [1] Stable

Writer name: 'BITS Writer'
   State: [1] Stable



Saturday, October 17, 2020 7:09:45 PM
Getting databases on server: EX01-2016

--------------------------------------------------------------------------------------------------------------


Number Name Mounted Server
------ ---- ------- ------
     0 DB01    True EX01-2016
     1 DB02    True EX01-2016





Select the number of the database to backup : 1

5. Check which drive is not in use. In our example, drive X: is not in use, and that’s what we will use.

Enter X: and press Enter.

The database guid for 'DB02' is: 313554ce-1503-4f81-8796-4ab0764d80c2

The database is mounted on server: EX01-2016

Saturday, October 17, 2020 7:15:58 PM
Status of 'DB02' and its replicas (if any)

--------------------------------------------------------------------------------------------------------------

DB02\EX01-2016 is Mounted



Saturday, October 17, 2020 7:15:58 PM
Creating diskshadow config file...

--------------------------------------------------------------------------------------------------------------


The selected database path is 'G:\DB02\DB02.edb' so adding volume G: to backup scope


The selected database log folder path is 'H:\DB02' so adding volume H: to backup scope



Adding the volume for DSH file
add volume G: alias vss_test_G
Adding the volume for DSH file
add volume H: alias vss_test_H


Saturday, October 17, 2020 7:15:58 PM
Getting drive letters for exposing backup snapshot
--------------------------------------------------------------------------------------------------------------


Since different volumes are used for this database's EDB and logs, we need two drive
letters to expose the backup snapshot.


Enter an unused drive letter with colon (e.g. X:) to expose the DATABASE volume : X:

6. This time, it asks for an unused drive letter for the log volume. We will use drive letter Y: because it’s not in use.

Press Y: and press Enter.

Enter an unused drive letter with colon (e.g. Y:) to expose the LOG volume : Y:


Saturday, October 17, 2020 7:18:48 PM
Enabling Diagnostics Logging...

--------------------------------------------------------------------------------------------------------------

MSExchange Repl\Service  -  Expert

MSExchange Repl\Exchange VSS Writer  -  Expert


Saturday, October 17, 2020 7:18:49 PM
Enabling VSS Tracing...

--------------------------------------------------------------------------------------------------------------

The command completed successfully.

Saturday, October 17, 2020 7:18:49 PM
Enabling ExTRA Tracing...

--------------------------------------------------------------------------------------------------------------


LastWriteTime : 10/17/2020 7:18:49 PM
Length        : 0
Name          : EnabledTraces.Config



Creating Exchange Trace data collector set...
The command completed successfully.
Starting Exchange Trace data collector...
The command completed successfully.



Saturday, October 17, 2020 7:18:49 PM
Starting DiskShadow copy of Exchange database: DB02

--------------------------------------------------------------------------------------------------------------

Running the following command:

"C:\Windows\System32\diskshadow.exe /s C:\temp\\diskshadow.dsh /l C:\temp\\diskshadow.log"


Microsoft DiskShadow version 1.0
Copyright (C) 2013 Microsoft Corporation
On computer:  EX01-2016,  10/17/20 19:18:49

-> set verbose on
-> set context persistent
->
-> writer exclude {e8132975-6f93-4464-a53e-1050253ae220}
-> writer exclude {2a40fd15-dfca-4aa8-a654-1f8c654603f6}
-> writer exclude {35E81631-13E1-48DB-97FC-D5BC721BB18A}
-> writer exclude {be000cbe-11fe-4426-9c58-531aa6355fc4}
-> writer exclude {4969d978-be47-48b0-b100-f328f07ac1e0}
-> writer exclude {a6ad56c2-b509-4e6c-bb19-49d8f43532f0}
-> writer exclude {afbab4a2-367d-4d15-a586-71dbb18f8485}
-> writer exclude {59b1f0cf-90ef-465f-9609-6ca8b2938366}
-> writer exclude {542da469-d3e1-473c-9f4f-7847f01fc64f}
-> writer exclude {4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f}
-> writer exclude {41e12264-35d8-479b-8e5c-9b23d1dad37e}
-> writer exclude {12ce4370-5bb7-4C58-a76a-e5d5097e3674}
-> writer exclude {cd3f2362-8bef-46c7-9181-d62844cdc062}
-> writer exclude {dd846aaa-A1B6-42A8-AAF8-03DCB6114BFD}
-> writer exclude {B2014C9E-8711-4C5C-A5A9-3CF384484757}
-> writer exclude {BE9AC81E-3619-421F-920F-4C6FEA9E93AD}
-> writer exclude {F08C1483-8407-4A26-8C26-6C267A629741}
-> writer exclude {6F5B15B5-DA24-4D88-B737-63063E3A1F86}
-> writer exclude {368753EC-572E-4FC7-B4B9-CCD9BDC624CB}
-> writer exclude {5382579C-98DF-47A7-AC6C-98A6D7106E09}
-> writer exclude {d61d61c8-d73a-4eee-8cdd-f6f9786b7124}
-> writer exclude {75dfb225-e2e4-4d39-9ac9-ffaff65ddf06}
-> writer exclude {0bada1de-01a9-4625-8278-69e735f39dd2}
-> writer exclude {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
->
-> writer exclude "Microsoft Exchange Writer:\Microsoft Exchange Server\Microsoft Information Store\EX01-2016\e18b64
16e-4bb8-bac2-a06b14ae35c7"
->
-> Begin backup
-> add volume G: alias vss_test_G
-> add volume H: alias vss_test_H
-> create

COM call "lvssObject4->GetRootAndLogicalPrefixPaths" failed.
Component "\Microsoft Exchange Server\Microsoft Information Store\EX01-2016\e18b648d-916e-4bb8-bac2-a06b14ae35c7" fr
riter "Microsoft Exchange Writer" is explicitly excluded.
Component "\config\sysq" from writer "MSMQ Writer (MSMQ)" is excluded from backup,
because it requires volume C:\ which is not in the shadow copy set.
Component "\config\registry" from writer "MSMQ Writer (MSMQ)" is excluded from backup,
because it requires volume C:\ which is not in the shadow copy set.
Component "\config\mapping" from writer "MSMQ Writer (MSMQ)" is excluded from backup,
because it requires volume C:\ which is not in the shadow copy set.
Component "\storage\queue" from writer "MSMQ Writer (MSMQ)" is excluded from backup,
because it requires volume C:\ which is not in the shadow copy set.
Component "\Microsoft Exchange Server\Microsoft Information Store\EX01-2016\e18b648d-916e-4bb8-bac2-a06b14ae35c7\Fil
rom writer "Microsoft Exchange Writer" is excluded from backup,
because it requires volume E:\ which is not in the shadow copy set.
Component "\Microsoft Exchange Server\Microsoft Information Store\EX01-2016\e18b648d-916e-4bb8-bac2-a06b14ae35c7\Log
rom writer "Microsoft Exchange Writer" is excluded from backup,
because it requires volume F:\ which is not in the shadow copy set.
Component "\config" from writer "MSMQ Writer (MSMQ)" is excluded from backup,
because it has an excluded descendent: "sysq".
Component "\storage" from writer "MSMQ Writer (MSMQ)" is excluded from backup,
because it has an excluded descendent: "queue".
Component "\Microsoft Exchange Server\Microsoft Information Store\EX01-2016\e18b648d-916e-4bb8-bac2-a06b14ae35c7" fr
riter "Microsoft Exchange Writer" is excluded from backup,
because it has an excluded descendent: "File".
The writer "MSMQ Writer (MSMQ)" is now entirely excluded from the backup,
because it does not contain any components that can be included.

* Including writer "Microsoft Exchange Writer":
        + Adding component: \Microsoft Exchange Server\Microsoft Information Store\EX01-2016\313554ce-1503-4f81-8796
0764d80c2

Alias vss_test_G for shadow ID {b4ba1ded-6ed4-46b1-8f13-9cce0de8ee71} set as environment variable.
Alias vss_test_H for shadow ID {02c7fb75-39c3-4b97-9f43-2b26933ad5ec} set as environment variable.
Alias VSS_SHADOW_SET for shadow set ID {406ad2fd-7850-48b4-b1e1-c49c4aa41606} set as environment variable.
Inserted file Manifest.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file BCDocument.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM0.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM1.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM2.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM3.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM4.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM5.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM6.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM7.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM8.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM9.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM10.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM11.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM12.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file WM13.xml into .cab file 20-10-17_-18-58_EX01-2016.cab
Inserted file diskshadow.log into .cab file 20-10-17_-18-58_EX01-2016.cab

Querying all shadow copies with the shadow copy set ID {406ad2fd-7850-48b4-b1e1-c49c4aa41606}

        * Shadow copy ID = {b4ba1ded-6ed4-46b1-8f13-9cce0de8ee71}               %vss_test_G%
                - Shadow copy set: {406ad2fd-7850-48b4-b1e1-c49c4aa41606}       %VSS_SHADOW_SET%
                - Original count of shadow copies = 2
                - Original volume name: \\?\Volume{b050fa5e-48f1-4941-bde7-c8175378669e}\ [G:\]
                - Creation time: 17/10/2020 19:18:58
                - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1
                - Originating machine: EX01-2016.exoip.local
                - Service machine: EX01-2016.exoip.local
                - Not exposed
                - Provider ID: {b5946137-7b9f-4925-af80-51abd60b20d5}
                - Attributes:  No_Auto_Release Persistent Differential

        * Shadow copy ID = {02c7fb75-39c3-4b97-9f43-2b26933ad5ec}               %vss_test_H%
                - Shadow copy set: {406ad2fd-7850-48b4-b1e1-c49c4aa41606}       %VSS_SHADOW_SET%
                - Original count of shadow copies = 2
                - Original volume name: \\?\Volume{114715bf-ed89-4814-ac77-d82735a68f92}\ [H:\]
                - Creation time: 17/10/2020 19:18:58
                - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2
                - Originating machine: EX01-2016.exoip.local
                - Service machine: EX01-2016.exoip.local
                - Not exposed
                - Provider ID: {b5946137-7b9f-4925-af80-51abd60b20d5}
                - Attributes:  No_Auto_Release Persistent Differential

Number of shadow copies listed: 2
->
-> expose %vss_test_G% X:
-> %vss_test_G% = {b4ba1ded-6ed4-46b1-8f13-9cce0de8ee71}
The shadow copy was successfully exposed as X:\.
-> expose %vss_test_H% Y:
-> %vss_test_H% = {02c7fb75-39c3-4b97-9f43-2b26933ad5ec}
The shadow copy was successfully exposed as Y:\.
-> end backup
->

Saturday, October 17, 2020 7:19:00 PM
Disabling ExTRA Tracing...

--------------------------------------------------------------------------------------------------------------


Stopping Exchange Trace data collector on EX01-2016...
The command completed successfully.
Deleting Exchange Trace data collector on EX01-2016...
The command completed successfully.



Saturday, October 17, 2020 7:19:01 PM
Disabling Diagnostics Logging...

--------------------------------------------------------------------------------------------------------------

MSExchange Repl\Service  -  Lowest

MSExchange Repl\Exchange VSS Writer  -  Lowest


Saturday, October 17, 2020 7:19:01 PM
Disabling VSS Tracing...

--------------------------------------------------------------------------------------------------------------

The command completed successfully.


Saturday, October 17, 2020 7:19:01 PM
Checking VSS Writer Status: (after backup)

--------------------------------------------------------------------------------------------------------------


Writer name: 'Task Scheduler Writer'
   State: [1] Stable

Writer name: 'VSS Metadata Store Writer'
   State: [1] Stable

Writer name: 'Performance Counters Writer'
   State: [1] Stable

Writer name: 'System Writer'
   State: [1] Stable

Writer name: 'ASR Writer'
   State: [1] Stable

Writer name: 'IIS Config Writer'
   State: [1] Stable

Writer name: 'IIS Metabase Writer'
   State: [1] Stable

Writer name: 'Registry Writer'
   State: [1] Stable

Writer name: 'Microsoft Exchange Writer'
   State: [1] Stable

Writer name: 'BITS Writer'
   State: [1] Stable

Writer name: 'Shadow Copy Optimization Writer'
   State: [1] Stable

Writer name: 'COM+ REGDB Writer'
   State: [1] Stable

Writer name: 'WMI Writer'
   State: [1] Stable

Writer name: 'MSMQ Writer (MSMQ)'
   State: [1] Stable


Saturday, October 17, 2020 7:19:06 PM
Diskshadow Snapshots

--------------------------------------------------------------------------------------------------------------


If the snapshot was successful, the snapshot should be exposed as drive(s) X: and Y:.
You should be able to see and navigate the snapshot with File Explorer. How would you like to proceed?

NOTE: It is recommended to wait a few minutes to allow truncation to possibly occur before moving past this point.
      This allows time for the logs that are automatically collected to include the window for the truncation to occur.

When ready, choose from the options below:

  1. Remove exposed snapshot now
  2. Keep snapshot exposed

WARNING: Selecting option 1 will permanently delete the snapshot created, i.e. your backup will be deleted.

Selection :

7. Start File Explorer and look at the X: and Y: drives.

Truncate Exchange logs with PowerShell script snapshot

8. Select option 1 and press Enter to delete the snapshot.

Selection : 1

LastWriteTime : 10/17/2020 7:26:44 PM
Length        : 0
Name          : removeSnapshot.dsh

Microsoft DiskShadow version 1.0
Copyright (C) 2013 Microsoft Corporation
On computer:  EX01-2016,  10/17/20 19:26:44

-> delete shadows exposed X:
Deleting shadow copy {b4ba1ded-6ed4-46b1-8f13-9cce0de8ee71} on volume \\?\Volume{b050fa5e-48f1-4941-bde7-c8175378669e}\
from provider {b5946137-7b9f-4925-af80-51abd60b20d5} [Attributes: 0x00120009]...

1 shadow copy deleted.
-> delete shadows exposed Y:
Deleting shadow copy {02c7fb75-39c3-4b97-9f43-2b26933ad5ec} on volume \\?\Volume{114715bf-ed89-4814-ac77-d82735a68f92}\
from provider {b5946137-7b9f-4925-af80-51abd60b20d5} [Attributes: 0x00120009]...

1 shadow copy deleted.
-> exit

Saturday, October 17, 2020 7:26:44 PM
Getting events from the application and system logs since the script's start time of (10/17/2020 19:02:38)

--------------------------------------------------------------------------------------------------------------

Getting application log events...
Getting system log events...
Getting events complete!


Saturday, October 17, 2020 7:26:49 PM
Stopping transcript log...

--------------------------------------------------------------------------------------------------------------

Transcript stopped, output file is C:\temp\vssTranscript.log



Please use the <Enter> key to exit...:

9. Press Enter to exit the PowerShell script.

Verify Exchange database logs

Verify that the script removed the snapshots and cleared the logs.

Truncate Exchange logs with PowerShell logs disk cleared

Open the database log volume and verify that Exchange database truncation is completed successfully.

Truncate Exchange logs with PowerShell check database logs

It’s looking great. Did this help you to truncate Exchange database logs without a backup?

Keep reading: Install FREE Let’s Encrypt certificate in Exchange Server »

Conclusion

You learned how to truncate Exchange database logs with PowerShell. The script is excellent if a high spike suddenly comes in, and the transaction logs are growing very fast. Or if the backup all of a sudden is not working.

Use the PowerShell script to clear Exchange database logs safely. The changes are applied immediately. There is no need to unmount and mount the database. That’s great because you will not disrupt any users.

Did you enjoy this article? You may also like Move Exchange database to another drive. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 21 Comments

  1. Hi Ali,
    I have 40 DBs in a drive and each DB and logs are under its folder, some of the DBs have circular logging enabled and truncate working fine, the rest Dbs increasing daily, and now the drive is almost full, please confirm how can i truncate the logs for those DBS where circular logging not enabled.
    2nd I tried to run the attached script but the error is “One or more writers are NOT in a ‘Stable’ state, STOPPING SCRIPT”
    Need your quick response and help..

  2. Hi Ali,
    It seems that the second drive (Y:) was not deleted when the script ended, can I delete it manually?

    1 shadow copy deleted.
    -> delete shadows exposed Y:
    Could not find the mount point.

    Senin, Maret 18, 2024 08:25:02
    Getting events from the application and system logs since the script’s start time of (03/18/2024 08:17:05)
    ————————————————————————————————————-
    Getting application log events…
    Getting system log events…
    Getting events complete!

    Senin, Maret 18, 2024 08:25:36
    Stopping transcript log…

    ————————————————————————————————————–
    Transcript stopped, output file is C:\temp\vssTranscript.log

    Please use the key to exit…:

  3. Hello! I’m very grateful for this article, script, and your blog, they’re awesome and extremely useful.
    Can you please check, if it still works for Exchange 2019 CU 14? I’ve successfully ran script before update but now it can’t properly check for exchange version, and stops on “This script is only for Exchange 2013, 2016, and 2019 servers.”

  4. Thanks for sharing this awesome article. Veeam stopped truncating the db logs on my DAG roughly 4 days ago even though they are supposed to truncate daily. The Exchange VSS writer was stable, and the Veeam log showed it truncated successfully, so I am not sure why it’s not truncating just yet. My logs folders were growing at an alarming rate and taking up 800 GB of disk space. I opted to run the VSSTester.ps1 on the active db server, and once it completed it truncated the logs on the passive copies. I waited a few minutes before deleting the snapshot in the last step. This script buys me some time to resolve the Veeam issue.

  5. Hi Ali,
    Could I kindly have the script version that works on exchange 2010?
    The current one would not run at all since it detect older version on my windows server.

    Thanks in advance

    Rodrigue

  6. Hello Ali,
    We got an Exchange 2019 running on Nutanix AHV cluster, Veeam for AHV is unable to trunk Exchange logs so on i want to try your method.
    I took the last version, aka 22.11.07.2248.
    I got the error Exchange Writer not present even if it is and in a “stable” status :

    Nom du rédacteur : ‘Microsoft Exchange Writer’
    ID du rédacteur : {76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}
    ID de l’instance du rédacteur : {c37b5343-b16c-4f67-9b77-ebecd9be33f4}
    État : [1] Stable
    Dernière erreur : Aucune erreur
    I try to find out why ai got the problem, i check DCOM and reboot Exchange Replication service.

    Do you have any other solution or any help on this ?

    Thanks for your help.

    1. Did u get any solution for this issue, same scenario with me also, We have Exchange Server 2019 on Nutanix AHV and backup solution for Veeam Backup but truncate logs is not clear.

  7. I have Exchange Server 19 where 3 databases are mounted and their logs and EDB are kept on the same drive. I want to clear one of these dblogs which has reached around 886GB where the EDB size is around 135GB.

    I have about 250 DB space left on the server please suggest if this method is suitable in my scenario or I need to do some other solution.

      1. Thank you dear, I have another question on the same topic, please guide me on it. Currently, I’m using Veeam Backup for the exchange server’s backup but it doesn’t have application-aware processing enabled. Should I enable it first and that will fix my problem or run the above script first and then enable truncate for the future? via application-aware processing in veeambackup

          1. Thanks dear, DB logs were successfully truncated after running the Veeam backup job. With your help, I have recovered more than 800 GB of space.

    1. In the PowerShell script, you have to enter two drive letters that are not in use. You should not create these drives manually. The PowerShell script will take care of it all.

  8. Mooi en duidelijk artikel Ali!
    Ik kan me herinneren dat we dit ooit (2 jaar geleden?) handmatig moesten doen bij een klant van ons op de KG. De maildataschijven liepen vaak vol door niet getruncated exchange logs ?
    Dit had veel tijd gescheeld bij de oplossing doorvoeren (hadden we dit eerder geweten) ?
    Bij een volgende keer kunnen we de Powershell oplossing toepassen, scheelt weer tijd ?
    Groet, Cor

Leave a Reply

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