Wednesday, March 30, 2022

20220330 powershell configure pagefile.sys

 Only for Powershell 5

Get-Volume; $pagefile = Get-WmiObject Win32_ComputerSystem -EnableAllPrivileges; $pagefile.AutomaticManagedPagefile = $false; $pagefile.put(); $pagefileset = Get-WmiObject Win32_pagefilesetting; $pagefileset.InitialSize = 1024; $pagefileset.MaximumSize = 8339; $pagefileset.put();Gwmi win32_Pagefilesetting | Select Name, InitialSize, MaximumSize; restart-computer -force


No comments:

Post a Comment