2016-06-14 11 views

ответ

3

Это, как мы можем изменить размер pagefile.sys с помощью 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 = <New_Value_For_Size_In_MB>; 
$pagefile.MaximumSize = <New_Value_For_Size_In_MB>; 
$pagefile.Put(); 

Выполните сценарий, как показано ниже:

PS> .\update_pagefile_size.ps1; 

 Смежные вопросы

  • Нет связанных вопросов^_^