Managing your Exchange Server efficiently is crucial for optimizing storage space. It's not uncommon for the "Owa\prem" folder to accumulate a significant size over time due to old Exchange build numbers. If you've noticed that the folder's size is becoming a concern, it's time to take action. You can use tools like TreeSize Explorer to get a clear view of the folder's size and contents. Once you've identified the old build numbers that need removal, follow the steps below to streamline your Exchange Server environment.

In this example, you can see the folder (the location in a standard installation is C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\prem\) is almost 20 GB size



Check the version that is currently in use

To avoid removing folders that are in use, let's check the Exchange version that is installed including security updates.

[PS] C:\> $ExchangeServers = Get-ExchangeServer | Sort-Object Name
[PS] C:\> ForEach ($Server in $ExchangeServers) { Invoke-Command -ComputerName $Server.Name -ScriptBlock { Get-Command Exsetup.exe | ForEach-Object { $_.FileversionInfo } } }


ProductVersion   FileVersion      FileName                                   PSComputerName
--------------   -----------      --------                                   --------------
15.02.1118.039   15.02.1118.039   C:\Program Files\Microsoft\Exchange Ser... EXCHSERVER01
15.02.1118.039   15.02.1118.039   C:\Program Files\Microsoft\Exchange Ser... EXCHSERVER02

So, the information we needed -> version 15.02.118.039

Rename Folders for Testing

Before proceeding with the actual removal of old Exchange build numbers, take a cautious approach by renaming the folders associated with those build numbers.

So, all the versions but the current one 15.2.119.039


Renaming allows you to test the impact of removing these folders without permanently deleting them. For example, you can add ".BAK" as a suffix to the folder names. This step helps ensure that OWA and other Exchange services continue to function correctly.

💡
Instead of renaming, if you prefer you can also move them to another location so you free space asap. In case of any problem you can move again them to their original path

Testing

Conduct thorough testing to ensure that the renaming of the folders did not negatively impact the functionality of Outlook Web App (OWA) or other Exchange services.

Remove renamed folders

After successful testing, proceed to remove the renamed folders. This allows you to safely remove the renamed old Exchange build numbers from the folder.

Documentation

Maintain detailed documentation of the changes you made, including the build numbers removed, the reasons for their removal, and the testing outcomes. This documentation will be valuable for future reference.

By following these steps in the provided order, you can effectively free up storage space on your Exchange Server, reduce clutter, and keep your server environment well-organized. Managing Exchange build numbers is a standard maintenance practice that helps keep your server efficient and streamlined.