skip to Main Content

Pagefile Exchange 2019 best practice PowerShell

How to configure the pagefile in Exchange Server 2019 through PowerShell? You can configure the pagefile in two ways. One of them is through Exchange Server GUI. The other way is with PowerShell. If you do it through the GUI, you need to do the math first. After that, you need to edit the pagefile. What if you don’t want to do the math and don’t want to edit the pagefile through the Exchange Server GUI? For example, you want it to run on many Exchange Servers. Editing every Exchange Server through the GUI will take time. What if you can run a script that will do it all? PowerShell to the rescue.

Read the article Pagefile Exchange 2013/2016 best practice and Pagefile Exchange 2013/2016 best practice PowerShell if you want to learn more and set the pagefile on an Exchange Server 2013/2016.

Pagefile information

Exchange 2019
Pagefile sizing is now 25% of total RAM (maximum of 64GB). The maximum memory is 256GB.
Exchange 2016
Pagefile sizing is RAM + 10MB (maximum of 32GB RAM + 10MB). The maximum memory is 192GB.

If you want to configure your Exchange Server 2019 pagefile. Here are some examples:

RAM        Pagefile
64GB       16GB
96GB       24GB
128GB     32GB
160GB     40GB
192GB     48GB
256GB     64GB

Microsoft recommends 128GB RAM for the Mailbox Role and 6GB RAM for the Edge Transport Role.

Configure Exchange Server pagefile through PowerShell

I came across the following post by MVP Damian Scoles. He made a script to configure the pagefile of the Exchange Server 2019. Download the Set-PagefileExchange2019.ps1 PowerShell script. Save the script in your c:\scripts\ folder. Run the PowerShell script as administrator. If you like, you can copy the script below and paste it in PowerShell. The script will remove the old pagefile and configure a new pagefile with the correct size.

It’s a great script and does the job. If you have many Exchange Servers and want to change the pagefile, make your life easier and run the script. Will you be using the PowerShell script in your Exchange Server 2019? I recommend to use the script.


You learned how to change the Exchange Server 2019 pagefile through PowerShell. Run the script and it will configure the pagefile on the Exchange Server 2019. Don’t forget to reboot after the change! This script should only run in Exchange Server 2019. Not on other Exchange Server versions. If you enjoyed this article, you may like Certificate warning during or after a new Exchange Server installation. Don’t forget to follow us and share this article.



ALI TAJRAN is a passionate IT Architect and IT Consultant. His specialism is designing and building complex enterprise environments. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has 0 Comments

Leave a Reply

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

Back To Top