All Forums >> [Scripting] >> Windows PowerShell >> Purge unused Exchange 2007 Transaction Logs Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
My company is migrating from Exchange 2000 to Exchange 2007. Our E2000 server contains roughly 90 Gig worth of Public Folder, Mail, & Calendar data. While simulating the migration in a Virtual Server environment I discovered that E2007 was generating a lot of transaction log files. I wrote this PowerShell script to purge the unneeded log files. At any given moment E2007 is using the newest X number of log files that exist. As a new one is added, the oldest log file in the relevant set becomes unneeded. I read about this in the following link: http://searchexchange.techtarget.com/tip/0,289483,sid43_gci1187056,00.html.
This code removes all the unneeded log files from the First Storage Group for a default installation of Exchange 2007.
Save it inside "Purge_Exchange_Transaction_Logs.ps1" and use Task Scheduler to run the process as often as necessary. I run this process every 10 minutes during a massive import and less often when the import/migration is finished.