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)