Pagefile – Manual or Windows Managed?

There has been a debate on if you let Windows manage the pagefile or if you specify how you want the page file.


So, what are your thoughts, if you have a Server that has 256GB of RAM, then Windows wants to use a 50GB pagefile.  Windows will ensure you never run out of space, but WOW, that’s a HUGE Pagefile.


So, if you are wanting to change it via powershell, then try this:

$System = GWMI Win32_ComputerSystem –EnableAllPrivileges –Computername Server1
$System.AutomaticManagedPagefile = $False

$CurrentPageFile = gwmi -query “select * from Win32_PageFileSetting where name=’c:\\pagefile.sys’” –computername Server1
$CurrentPageFile.InitialSize = [int]16384
$CurrentPageFile.MaximumSize = [int]16384


If you are not keen on Powershell and want do to it batch, then use this:

wmic pagefile list /format:list

wmic.exe computersystem set AutomaticManagedPagefile=False

wmic.exe pagefileset where name=”C:\\pagefile.sys” set InitialSize=16384,MaximumSize=16384


Either will get you where you want.

But the debate still remains and I’m not sure which is best…so I’m open to suggestions.  Email me and let me know your thoughts.

(All code is provided on a AS IS so use at your own risk)


Written by , Posted .


  1. Clint Huffman

    Page file sizing depends on the crash dump setting of the system as well as accomodating the system commit charge. Both of which depends on actual memory demands. For more guidance on this subject, check out my blog at

  2. roncrumbaker

    Great link! Lots of information out there…and yes, there are many variables when deciding on how large of a pagefile do you want/need…but I think that piece is easy, its the Do I let Windows Manage it or do I manage it that goes on and on.

Leave a Comment

You must be logged in to post a comment.