Ajout des formules et scripts pour désactivation du swap Windows. A tester.

This commit is contained in:
2018-04-30 16:51:13 +02:00
parent 7d6bf934b2
commit d046f0bb35
2 changed files with 12 additions and 0 deletions

9
files/NoSwap.ps1 Normal file
View File

@@ -0,0 +1,9 @@
# 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();

3
windows/NoSwap.sls Normal file
View File

@@ -0,0 +1,3 @@
Desactivation du Swap Windows:
cmd.run:
- name: salt://files/NoSwap.ps1