I run a lot of virtual machines on a tight budget with thin-provisioned storage, so wasted disk space bothers me. A large default page file on every Windows VM adds up quickly. To keep it in check, I set a fixed page file size with a registry preference in my “Server Optimization” GPO.
GPO Location
Computer Configuration
Preferences
Windows Settings
Registry
Registry Item Settings
| Action | Update |
| Hive | HKEY_LOCAL_MACHINE |
| Key path | SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management |
| Value name | PagingFiles |
| Value type | REG_MULTI_SZ |
| Value data | c:\pagefile.sys 1000 1000 |
The value data sets the page file on C: to a fixed 1,000 MB (initial and maximum size). On the Common tab, I leave all options (stop processing on error, remove when no longer applied, apply once) set to No.
Slap that in your GPO, and the change takes effect after the next Group Policy refresh and reboot.
