How to change pagefile size in windows console?
- User
How to change pagefile size in windows console?
Assistant
Changing Pagefile Size in Windows Console
You can change the pagefile size in Windows using the command line with the
wmiccommand. Here's how to do it:Method 1: Using WMIC (Windows Management Instrumentation Command-line)
-
Open Command Prompt as Administrator
-
Use the following command to view current pagefile settings:
wmic pagefile list /format:list -
To change the pagefile size, use:
wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=4096,MaximumSize=8192(This sets a 4GB initial size and 8GB maximum size on the C: drive)
Method 2: Using PowerShell
-
Open PowerShell as Administrator
-
Run the following command to view current settings:
Get-WmiObject -Class Win32_PageFileSetting -
To modify the pagefile:
$pagefile = Get-WmiObject -Class Win32_PageFileSetting $pagefile.InitialSize = 4096 $pagefile.MaximumSize = 8192 $pagefile.Put()
Note: After changing the pagefile size, you'll need to restart your computer for the changes to take effect.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.