Disabling Automatic Page Files

by Dec 22, 2010

If you would like to programmatically control page file settings, you can use WMI but must enable all privileges using -EnableAllPrivileges. The code below will disable automatic page files:

$c = Get-WmiObject Win32_ComputerSystem -EnableAllPrivileges
$c.AutomaticManagedPagefile = $false
$c.Put()

Twitter This Tip!
ReTweet this Tip!