Below is a straightforward, copy-and-paste–friendly way to create a fixed 1 TB pagefile on drive L: from an elevated Command Prompt (CMD) in Windows 10/11 x64.
⚠️ Important
• You must run CMD “as Administrator.”
• A reboot is required for the new pagefile to be used.
• 1 TB = 1,048,576 MB; make sure you actually have that much free space on L:.
1. Disable automatic page-file management
wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False
2. (Optional) Remove any existing pagefile(s)
wmic pagefileset where name!="L:\\pagefile.sys" delete
If you already have a pagefile on L:, delete it as well or skip this step.
3. Create a new pagefile stub on L:
wmic pagefileset create name="L:\\pagefile.sys"
4. Set the initial and maximum size to 1 TB (1,048,576 MB)
wmic pagefileset where name="L:\\pagefile.sys" set InitialSize=1048576,MaximumSize=1048576
5. Verify your settings
wmic pagefileset list /format:list
You should see:
InitialSize=1048576
MaximumSize=1048576
Name=L:\pagefile.sys
6. Reboot
shutdown /r /t 0
After Windows restarts, the 1 TB pagefile on L:\ should be active.
Troubleshooting & Notes
| Issue | Fix / Explanation |
|---|
| “Access denied” | Make sure CMD is running as Administrator. |
| Pagefile doesn’t show after reboot | Check that AutomaticManagedPagefile is still False and that the registry key HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles contains L:\pagefile.sys 1048576 1048576. |
| Insufficient disk space | L: must have ≥ 1 TB free. |
| Need a variable-size file | Set InitialSize=<min MB> and MaximumSize=<max MB> instead of the same value. |
| Want to go back to automatic | wmic computersystem where name="%computername%" set AutomaticManagedPagefile=True and reboot. |
That’s it—after the reboot Windows will start using the brand-new 1 TB pagefile on drive L:.