How to change virtual memory on systems with different RAM sizes via script ?
I have Win10 ENT 1809 systems with 8GB of RAM and now 16GB of RAM. How can I change the virtual memory via a script that reads the RAM amount and changes accordingly ? The WIM virtual memory is set for 8GB 12288/24576 and 16GB machines needs to be set at 24576/49152. I just need a script I can run in a task sequence after image deployment. HELP.
open google and search "change page file command line"
look at result 3 https://social.technet.microsoft.com/Forums/windows/en-US/01b59794-f904-4983-9df3-5da8327f509d/how-to-change-page-file-size-and-location-from-command-line-during-setup?forum=w7itproinstall
To change the page file size from command line, enter the line below (adapt the location and size)wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=2048,MaximumSize=2048After setting the pagefile yourself, you can check its settings with:
wmic pagefileset or wmic pagefileset list /format:listthen restart your computerregards,
I've used RegFromApp to "scan" changes in the registry by the AdvancedProperties program and I've found that it changes the "PagingFiles" key in the registry.So, I've executed the following:reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d "d:\pagefile.sys 2048 2048" /restarted Windows, and voilà, the pagefile in c:\ is gone, and a new one is created in the D:\ drive.Easy.