Skip navigation
Modify Pagefile Configuration from the Command Line

Modify Pagefile Configuration from the Command Line

Q: How can I change the pagefile configuration from the command line?

A: This is very useful on Server Core systems where no graphical interface is required. Here I create a new pagefile on the P: volume and delete the old pagefile:

wmic pagefileset create name="P:\pagefile.sys"

wmic pagefileset where name="P:\\pagefile.sys" set InitialSize=2048,MaximumSize=2048

wmic pagefileset where name="C:\\pagefile.sys" delete

Reboot the machine for the change to take effect. To list the pagefiles, use the command below:

wmic pagefile list /format:list


Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.