10 lines
368 B
PowerShell
10 lines
368 B
PowerShell
# PowerShell Script to set the size of pagefile.sys
|
|
|
|
$computersys = Get-WmiObject Win32_ComputerSystem -EnableAllPrivileges;
|
|
$computersys.AutomaticManagedPagefile = $False;
|
|
$computersys.Put();
|
|
$pagefile = Get-WmiObject -Query "Select * From Win32_PageFileSetting Where Name like '%pagefile.sys'";
|
|
$pagefile.InitialSize = 0;
|
|
$pagefile.MaximumSize = 0;
|
|
$pagefile.Put();
|