How to Change Page File Size in Windows 11

To change page file size in Windows 11, open Advanced System Settings, choose Virtual memory, enter custom sizes, and restart.

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To change page file size in Windows 11, open Advanced system settings, open the Virtual memory controls, turn off automatic management, and enter your custom sizes. Select Set, confirm with OK, and restart Windows to apply the change. These steps use Windows 11 menus.

The short version

  • Open the controls: Press Windows + R, enter SystemPropertiesAdvanced, and press Enter.
  • Enter your sizes: Select Custom size: and fill in Initial size (MB): and Maximum size (MB): for the selected drive.
  • Apply the change: Select Set, close the dialogs with OK, and restart Windows.
  • Return to automatic sizing: Check Automatically manage paging file size for all drives, select OK, and restart.

Place or optionWhat you can do
Run and Custom size:Open the controls with SystemPropertiesAdvanced and enter sizes in MB
Start searchSearch for advanced system settings to reach the same controls
Control Panel or Windows + Pause/BreakReach system information and continue to Advanced system settings
Automatically manage paging file size for all drivesLet Windows manage sizing across drives
System managed sizeLet Windows size the paging file on a selected drive
Move or remove pagingSelect No paging file on the existing drive and configure another drive if moving
PowerShell with CIMChange the sizes of an existing matching paging file
Automatic management with PowerShellRestore automatic sizing through CIM
Create a pagefile policyControl permission to create or resize paging files, without setting their sizes

Open the virtual memory controls

Press Windows + R to open Run. Enter the following command, then press Enter.

SystemPropertiesAdvanced

On the Advanced tab, find Performance and select Settings.... In the next dialog, select Advanced, then select Change... under Virtual memory.

You can also open Start, search for advanced system settings, and open the matching result. This opens the same controls, so continue through the Performance settings to Virtual memory.

Select Start to open the Windows Start menu.
Click to expand
Select Start to open the Windows Start menu.

Set a custom page file size

Uncheck Automatically manage paging file size for all drives, then select the drive whose paging file you want to change. Select Custom size:, then enter your desired starting size in Initial size (MB): and your upper limit in Maximum size (MB):. Both values are in megabytes.

Select Set, then select OK. Close the remaining dialogs with OK and restart Windows to apply your settings.

Use Control Panel instead

From Control Panel, open System and Security > System > Advanced system settings. You can also press Windows + Pause/Break to open system information, then continue to Advanced system settings.

Continue through Advanced > Performance > Settings... > Advanced, then select Change... under Virtual memory. Apply your sizing choice and restart Windows.

Restore automatic page file sizing

To let Windows manage sizing across drives again, return to the Virtual Memory dialog. Check Automatically manage paging file size for all drives, select OK, and restart Windows.

You can also let Windows manage the paging file on a particular drive. Uncheck Automatically manage paging file size for all drives, select the drive, then select System managed size. Select Set, confirm with OK, and restart.

Move or remove a paging file

Moving paging requires another suitable drive. Open the Virtual Memory dialog and uncheck Automatically manage paging file size for all drives.

Removing a drive's paging file disables paging on that drive, and disabling all paging files can reduce the commit limit and affect crash dump capture. Select the existing drive, select No paging file, and select Set.

To move paging, select the destination drive and choose Custom size: or System managed size. For a custom size, enter values in Initial size (MB): and Maximum size (MB):. Select Set, apply the changes with OK, and restart Windows.

For removal alone, omit the destination drive configuration after selecting No paging file and Set on the existing drive. Confirm with OK and restart Windows.

Change an existing paging file with PowerShell

To change an existing paging file with commands, open Windows PowerShell and select Run as administrator. The sizing command requires an existing matching paging file setting.

First, turn off automatic page file management. Run this command:

Get-CimInstance Win32_ComputerSystem | Set-CimInstance -Property @{AutomaticManagedPagefile=$false}

Next, inspect the configured paging files. Run this command and check the returned name before choosing the file to change:

Get-CimInstance Win32_PageFileSetting | Select-Object Name,InitialSize,MaximumSize

The following command applies only when an existing setting matches C:\pagefile.sys. Replace the example values 4096 and 8192 with your intended initial and maximum sizes in MB before running it.

Get-CimInstance Win32_PageFileSetting | Where-Object Name -eq 'C:\pagefile.sys' | Set-CimInstance -Property @{InitialSize=[uint32]4096;MaximumSize=[uint32]8192}

Restart Windows after making the change. If the inspection does not show an existing matching setting, use the graphical Virtual Memory controls instead.

If you encounter older instructions using WMIC, use the graphical controls or PowerShell with CIM instead. Microsoft has removed WMIC from updated supported Windows 11 installations. WMI, which these CIM commands use, remains supported.

Return to automatic management with PowerShell

To restore automatic page file management from the command line, open Windows PowerShell and select Run as administrator. Run the following command, then restart Windows.

Get-CimInstance Win32_ComputerSystem | Set-CimInstance -Property @{AutomaticManagedPagefile=$true}

Manage permission to resize paging files

If you administer Windows 11 Pro, Enterprise, Education, IoT Enterprise or IoT Enterprise LTSC, you can control who may create or resize paging files through policy. In Group Policy, open Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Create a pagefile. This controls permission rather than the size in MB.

As an MDM administrator, you can configure the corresponding device policy at ./Device/Vendor/MSFT/Policy/Config/UserRights/CreatePageFile. Perform the actual sizing through System Properties or WMI using the methods above.

Frequently Asked Questions

How do you make the page file a fixed size?

Enter equal values in Initial size (MB): and Maximum size (MB):. Equal initial and maximum values specify a fixed size for the selected drive.

Can you change page file size on Windows 11 Home?

Yes, you can use the Advanced System Settings method on Windows 11 Home, as well as Pro, Enterprise and Education. Home lacks Local Group Policy Editor, but you can use the graphical sizing controls.

Do you need administrator privileges for the graphical method?

Yes, you normally need administrator privileges to resize the page file through Advanced System Settings. Choosing a different entry point, such as Start search or Control Panel, still opens the same controls.

Why did a system managed page file get larger after a crash?

If you use Automatic Memory Dump with system-managed paging, Windows can enlarge the paging file after a crash. Microsoft says that enlargement can be retained for four weeks.

Share